|
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html lang="en"> |
3 | 3 | <head> |
4 | | - <meta charset="utf-8"/> |
5 | | - <meta http-equiv="X-UA-Compatible" content="IE=edge"/> |
6 | | - <title>My form exercise</title> |
7 | | - <meta name="description" content=""/> |
8 | | - <meta name="viewport" content="width=device-width, initial-scale=1"/> |
9 | | - <link rel="stylesheet" href="main.css"> |
| 4 | + <meta charset="utf-8"/> |
| 5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"/> |
| 6 | + <title>My form exercise</title> |
| 7 | + <meta name="description" content=""/> |
| 8 | + <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 9 | + <link rel="stylesheet" href="main.css"> |
10 | 10 |
|
11 | 11 | </head> |
12 | 12 | <body> |
13 | 13 | <header> |
14 | | - <div class="container"> |
15 | | - <h1>Product Pick</h1> |
16 | | - </div> |
| 14 | + <div class="container"> |
| 15 | + <h1>Product Pick</h1> |
| 16 | + </div> |
17 | 17 | </header> |
18 | 18 | <main> |
19 | | - <div class="container"> |
20 | | - <form> |
21 | | - <!-- write your HTML here--> |
22 | | - <!-- |
23 | | - try writing out the requirements first as comments |
24 | | - this will also help you fill in your PR message later--> |
| 19 | + <div class="container"> |
| 20 | + <form> |
| 21 | + <!-- write your HTML here--> |
| 22 | + <!-- |
| 23 | + try writing out the requirements first as comments |
| 24 | + this will also help you fill in your PR message later--> |
25 | 25 |
|
26 | | - <!-- first and lastname (ensure it contains at least two non-space characters.)--> |
27 | | - <!-- email (make sure the email is valid. Email addresses follow a consistent pattern.)--> |
28 | | - <!-- shirt color (I must provide 3 options. How will I ensure they do not choose other colors?)--> |
29 | | - <!-- shirt size (must provide the following 6 options: XS, S, M, L, XL, XXL)--> |
| 26 | + <!-- first and lastname (ensure it contains at least two non-space characters.)--> |
| 27 | + <!-- email (make sure the email is valid. Email addresses follow a consistent pattern.)--> |
| 28 | + <!-- shirt color (I must provide 3 options. How will I ensure they do not choose other colors?)--> |
| 29 | + <!-- shirt size (must provide the following 6 options: XS, S, M, L, XL, XXL)--> |
30 | 30 |
|
31 | 31 |
|
32 | | - <div class="form-group"> |
33 | | - <label for="firstname">First Name </label> |
34 | | - <input |
35 | | - type="text" |
36 | | - id="firstname" |
37 | | - name="firstname" |
38 | | - required |
39 | | - pattern="^[A-Za-z]{2,15}$" |
40 | | - title="first name must be between 2 and 15 characters" |
41 | | - > |
42 | | - </div> |
| 32 | + <div class="form-group"> |
| 33 | + <label for="firstname">First Name </label> |
| 34 | + <input |
| 35 | + type="text" |
| 36 | + id="firstname" |
| 37 | + name="firstname" |
| 38 | + required |
| 39 | + pattern="^[A-Za-z]{2,15}$" |
| 40 | + title="first name must be between 2 and 15 characters" |
| 41 | + > |
| 42 | + </div> |
43 | 43 |
|
44 | | - <div class="form-group"> |
45 | | - <label for="lastname">Last Name</label> |
46 | | - <input |
47 | | - type="text" |
48 | | - id="lastname" |
49 | | - name="lastname" |
50 | | - required |
51 | | - pattern="^[A-Za-z]{2,15}$" |
52 | | - title="last name must be between 2 and 15 characters"> |
53 | | - </div> |
| 44 | + <div class="form-group"> |
| 45 | + <label for="lastname">Last Name</label> |
| 46 | + <input |
| 47 | + type="text" |
| 48 | + id="lastname" |
| 49 | + name="lastname" |
| 50 | + required |
| 51 | + pattern="^[A-Za-z]{2,15}$" |
| 52 | + title="last name must be between 2 and 15 characters"> |
| 53 | + </div> |
54 | 54 |
|
55 | | - <div class="form-group"> |
56 | | - <label for="email">Email</label> |
57 | | - <input |
58 | | - type="email" |
59 | | - id="email" |
60 | | - name="email" |
61 | | - required |
62 | | - pattern="^[^\s@]+@[^\s@]\.(com|co\.uk)$" |
63 | | - title="Enter a valid email"> |
64 | | - </div> |
| 55 | + <div class="form-group"> |
| 56 | + <label for="email">Email</label> |
| 57 | + <input |
| 58 | + type="email" |
| 59 | + id="email" |
| 60 | + name="email" |
| 61 | + required> |
65 | 62 |
|
66 | | - <div class="form-group"> |
67 | | - <fieldset> |
68 | | - <legend>Choose a shirt color:</legend> |
69 | | - <div class="form-group-fieldset"> |
70 | | - <input |
71 | | - type="radio" |
72 | | - id="choice1" |
73 | | - name="shirt" |
74 | | - value="blue" |
75 | | - > |
76 | | - <label for="choice1">Blue</label> |
77 | | - </div> |
| 63 | + </div> |
78 | 64 |
|
79 | | - <div class="form-group-fieldset"> |
80 | | - <input |
81 | | - type="radio" |
82 | | - id="choice2" |
83 | | - name="shirt" |
84 | | - value="green" |
85 | | - > |
86 | | - <label for="choice2">Green</label> |
87 | | - </div> |
| 65 | + <div class="form-group"> |
| 66 | + <fieldset> |
| 67 | + <legend>Choose a shirt color:</legend> |
| 68 | + <div class="form-group-fieldset"> |
| 69 | + <input |
| 70 | + type="radio" |
| 71 | + id="choice1" |
| 72 | + name="shirt" |
| 73 | + value="blue" |
| 74 | + > |
| 75 | + <label for="choice1">Blue</label> |
| 76 | + </div> |
88 | 77 |
|
89 | | - <div class="form-group-fieldset"> |
90 | | - <input |
91 | | - type="radio" |
92 | | - id="choice3" |
93 | | - name="shirt" |
94 | | - value="yellow" |
95 | | - > |
96 | | - <label for="choice3">Yellow</label> |
97 | | - </div> |
98 | | - </fieldset> |
99 | | - </div> |
| 78 | + <div class="form-group-fieldset"> |
| 79 | + <input |
| 80 | + type="radio" |
| 81 | + id="choice2" |
| 82 | + name="shirt" |
| 83 | + value="green" |
| 84 | + > |
| 85 | + <label for="choice2">Green</label> |
| 86 | + </div> |
100 | 87 |
|
101 | | - <div class="form-group"> |
102 | | - <label for="sizing">Choose a size:</label> |
103 | | - <select id="sizing" name="size"> |
104 | | - <option value="">--Please choose an option--</option> |
105 | | - <option value="ex-small">XS</option> |
106 | | - <option value="small">S</option> |
107 | | - <option value="medium">M</option> |
108 | | - <option value="large">L</option> |
109 | | - <option value="ex-large">XL</option> |
110 | | - <option value="ex-ex-large">XXL</option> |
| 88 | + <div class="form-group-fieldset"> |
| 89 | + <input |
| 90 | + type="radio" |
| 91 | + id="choice3" |
| 92 | + name="shirt" |
| 93 | + value="yellow" |
| 94 | + > |
| 95 | + <label for="choice3">Yellow</label> |
| 96 | + </div> |
| 97 | + </fieldset> |
| 98 | + </div> |
111 | 99 |
|
112 | | - </select> |
113 | | - </div> |
114 | | - <button>Submit</button> |
115 | | - </form> |
116 | | - </div> |
| 100 | + <div class="form-group"> |
| 101 | + <label for="sizing">Choose a size:</label> |
| 102 | + <select id="sizing" name="size"> |
| 103 | + <option value="">--Please choose an option--</option> |
| 104 | + <option value="ex-small">XS</option> |
| 105 | + <option value="small">S</option> |
| 106 | + <option value="medium">M</option> |
| 107 | + <option value="large">L</option> |
| 108 | + <option value="ex-large">XL</option> |
| 109 | + <option value="ex-ex-large">XXL</option> |
| 110 | + |
| 111 | + </select> |
| 112 | + </div> |
| 113 | + <button type="submit">Submit</button> |
| 114 | + </form> |
| 115 | + </div> |
117 | 116 | </main> |
118 | 117 |
|
119 | 118 | <footer> |
120 | | - <!-- change to your name--> |
121 | | - <div class="container"> |
122 | | - <p>By DAMILOLA ODUMOSU</p> |
123 | | - </div> |
| 119 | + <!-- change to your name--> |
| 120 | + <div class="container"> |
| 121 | + <p>By DAMILOLA ODUMOSU</p> |
| 122 | + </div> |
124 | 123 | </footer> |
125 | 124 | </body> |
126 | 125 | </html> |
|
0 commit comments