-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform_exercise.html
81 lines (73 loc) · 2.04 KB
/
form_exercise.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
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html>
<head>
<title>Form Exercise</title>
</head>
<body>
<h1>Register</h1>
<form>
<!-- First and last names are text -->
<label for="first">First Name:</label>
<input id="first" type="text" name="first_name" placeholder="John" required>
<label for="last">Last Name:</label>
<input id="last" type="text" name="last_name" placeholder="Smith" required>
<!-- gender is radio button -->
<div>
<label for="male">Male:</label>
<input id="male" type="radio" name="gender" value="m">
<label for="female">Female:</label>
<input id="female" type="radio" name="gender" value="f">
<label for="other">Other:</label>
<input id="other" type="radio" name="gender" value="o">
</div>
<!-- email and password with validation -->
<div>
<label>
Email:
<input type="email" name="email" placeholder="your email" required>
</label>
<label>
Password:
<input type="password" name="password" pattern=".{5,10}" required title="Password must be between 5 and 10 characters">
</label>
</div>
<!-- birthday will be three selects -->
<div>
<label>
Birthday
<select name="month">
<option>Month</option>
<option value="january">Jan</option>
<option value="february">Feb</option>
<option value="march">Mar</option>
</select>
<select name="day">
<option>Day</option>
<option>01</option>
<option>02</option>
<option>03</option>
<option>04</option>
<option>05</option>
<option>06</option>
</select>
<select name="year">
<option>Year</option>
<option>1980</option>
<option>1981</option>
<option>1982</option>
<option>1983</option>
<option>1984</option>
<option>1985</option>
</select>
</label>
</div>
<div>
<label for="agreed">I accept the terms and conditions</label>
<input id="agreed" type="checkbox" name="agreed" value="true">
</div>
<div>
<input type="submit">
</div>
</form>
</body>
</html>