DAY 4 - Forms
DAY 4 - Forms
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>Forms</h1>
<form action="">
<div>
<label>User Name</label>
<input type="text">
</div>
<br>
<div>
<label>Password</label>
<input type="password" required>
</div>
<br>
<div>
<label>contact</label>
<input type="number">
</div>
<br>
<div>
<label>email</label>
<input type="email">
</div>
<br>
<div>
<label>java</label>
<input type="checkbox">
</div>
<br>
<div>
<label>python</label>
<input type="checkbox">
</div>
<br>
<div>
<input type="radio">
<label>online</label>
</div>
<br>
<div>
<input type="radio">
<label>offline</label>
</div>
<br>
<div>
<label>resume</label>
<input type="file">
</div>
<br>
<div>
<select>
<option>35000</option>
<option>75000</option>
<option>55000</option>
</select>
</div>
<br>
<button type="submit">submit</button>
<button type="reset">reset</button>
</form>
</body>
</html>
Output
DAY 4 – Forms – Part 2
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Sample Form</title>
</head>
<body>
<h1>Registration Form</h1>
<form action="submit.php" method="POST">
<!-- Text Input -->
<label for="firstName">First Name:</label>
<input type="text" name="firstName" id="firstName" required>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<!-- File Input -->
<label for="fileUpload">Upload a file:</label>
<input type="file" name="fileUpload" id="fileUpload">
<br>
Output