-
Notifications
You must be signed in to change notification settings - Fork 0
/
forms.html
71 lines (62 loc) · 2.28 KB
/
forms.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML Forms</title>
</head>
<body>
<form action="submit_page.php" method="post">
<!-- usage of form elements: inputs, text area, select, button -->
<label for="firstname">First Name:</label>
<input type="text" id="firstname" required>
<br/>
<br/>
<label for="age">Age:</label>
<input type="number" id="age" required>
<br/>
<br/>
<label for="email">Email:</label>
<input type="email" id="Email" required>
<br/>
<br/>
<label for="message">Message</label>
<textarea id="message" rows="4" cols="50"></textarea>
<br/>
<br/>
<label for="gender">Gender</label>
<select name="gender" id="gender">
<option value="male">Male</option>
<option value="female">Female</option>
<option value="others">Others</option>
</select>
<br/>
<br/>
<!-- Radio buttons and checkboxes -> provide options for users to make selections -->
<input type="radio" id="option1" name="options" value="option1"/>
<label for="option1">Option 1</label>
<input type="radio" id="option2" name="options" value="option2"/>
<label for="option2">Option 2</label>
<input type="radio" id="option3" name="options" value="option3"/>
<label for="option3">Option 3</label>
<input type="radio" id="option4" name="options" value="option4"/>
<label for="option4">Option 4</label>
<br/>
<br/>
<input type="checkbox" name="choices" id="optionA" value="optionA">
<input type="checkbox" name="choices" id="optionB" value="optionB">
<input type="checkbox" name="choices" id="optionC" value="optionC">
<input type="checkbox" name="choices" id="optionD" value="optionD">
<br/>
<br/>
<input type="checkbox" id="optionA" name="choices" value="optionA" />
<label for="optionA">Option A</label>
<input type="checkbox" id="optionB" name="choices" value="optionB" />
<label for="optionB">Option B</label>
<br/>
<br/>
<button>Submit</button>
</form>
<!-- post and get -->
</body>
</html>