0% found this document useful (0 votes)
14 views5 pages

DAY 4 - Forms

The document consists of two parts detailing HTML forms. Part 1 includes fields for user input such as username, password, contact number, email, checkboxes for programming languages, radio buttons for preferences, and a file upload option. Part 2 presents a registration form with various input types including text, checkboxes, radio buttons, email, date, comments, a dropdown menu for country selection, and a file upload feature.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views5 pages

DAY 4 - Forms

The document consists of two parts detailing HTML forms. Part 1 includes fields for user input such as username, password, contact number, email, checkboxes for programming languages, radio buttons for preferences, and a file upload option. Part 2 presents a registration form with various input types including text, checkboxes, radio buttons, email, date, comments, a dropdown menu for country selection, and a file upload feature.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Day- 4 – Forms – Part-1

<!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>

<!-- Checkbox -->


<label>Interests:</label>
<input type="checkbox" name="interests" value="sports"> Sports
<input type="checkbox" name="interests" value="music"> Music
<input type="checkbox" name="interests" value="travel"> Travel

<br>

<!-- Radio Buttons -->


<label>Gender:</label>
<input type="radio" name="gender" value="male"> Male
<input type="radio" name="gender" value="female"> Female

<br>

<!-- Email Input -->


<label for="email">Email:</label>
<input type="email" name="email" id="email" required>

<br>

<!-- Date Input -->


<label for="birthdate">Date of Birth:</label>
<input type="date" name="birthdate" id="birthdate">

<br>

<!-- Text Area -->


<label for="comments">Comments:</label>
<textarea name="comments" id="comments" rows="4" cols="50"></textarea>

<br>

<!-- Drop-Down Menu -->


<label for="country">Country:</label>
<select name="country" id="country">
<option value="usa">United States</option>
<option value="canada">Canada</option>
<option value="uk">United Kingdom</option>
</select>

<br>
<!-- File Input -->
<label for="fileUpload">Upload a file:</label>
<input type="file" name="fileUpload" id="fileUpload">

<br>

<!-- Buttons -->


<input type="submit" value="Sign Up">
<input type="reset" value="Reset">
</form>
</body>
</html>

Output

You might also like