Programming Examples
Create a web form that will ask for following inputs from the user- Name, Age, email, mobile no. address.
Create a web form that will ask for following inputs from the user- Name, Age, email, mobile no. address.
Solution<!DOCTYPE html>
<html>
<head>
<title>User Information Form</title>
</head>
<body>
<h2>User Information Form</h2>
<form>
<!-- Name -->
<label>Name:</label><br>
<input type="text" name="name" required><br><br>
<!-- Age -->
<label>Age:</label><br>
<input type="number" name="age" required><br><br>
<!-- Email -->
<label>Email:</label><br>
<input type="email" name="email" required><br><br>
<!-- Mobile Number -->
<label>Mobile No.:</label><br>
<input type="tel" name="mobile" pattern="[0-9]{10}" placeholder
▶ RUN Output/ Explanation: