11<!DOCTYPE html>
22< html lang ="en ">
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- </ head >
10- < body >
11- < header >
12- < h1 > Product Pick</ h1 >
13- </ header >
14- < main >
15- < form >
16- <!-- Requirements:
3+
4+ < head >
5+ < meta charset ="utf-8 " />
6+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge " />
7+ < title > My form exercise</ title >
8+ < meta name ="description " content ="" />
9+ < meta name ="viewport " content ="width=device-width, initial-scale=1 " />
10+ </ head >
11+
12+ < body >
13+ < header >
14+ < h1 > Product Pick</ h1 >
15+ </ header >
16+ < main >
17+ < form >
18+ <!-- Requirements:
1719 - Collect customer name (minimum 2 characters)
1820 - Collect customer email (must be valid email)
1921 - Choose 1 colour from 3 options
@@ -22,101 +24,75 @@ <h1>Product Pick</h1>
2224 - HTML only, no CSS or JavaScript
2325 - No form action
2426 -->
25- < p >
26- < label for ="customer-name "> Name</ label > < br />
27- < input
28- type ="text "
29- id ="customer-name "
30- name ="customerName "
31- required
32- minlength ="2 "
33- />
34- </ p >
35- < p >
36- < label for ="customer-email "> Email</ label > < br />
37- < input
38- type ="email "
39- id ="customer-email "
40- name ="customerEmail "
41- required
42- />
43- </ p >
44- < fieldset >
45- < legend > Choose a colour</ legend >
27+ < p >
28+ < label for ="customer-name "> Name</ label > < br />
29+ < input type ="text " id ="customer-name " name ="customerName " required minlength ="2 " />
30+ </ p >
31+ < p >
32+ < label for ="customer-email "> Email</ label > < br />
33+ < input type ="email " id ="customer-email " name ="customerEmail " required />
34+ </ p >
35+ < fieldset >
36+ < legend > Choose a colour</ legend >
37+
38+ < p >
39+ < input type ="radio " id ="colour-red " name ="tshirtColour " value ="red " required />
40+ < label for ="colour-red "> Red</ label >
41+ </ p >
4642
47- < p >
48- < input
49- type ="radio "
50- id ="colour-red "
51- name ="tshirtColour "
52- value ="red "
53- required
54- />
55- < label for ="colour-red "> Red</ label >
56- </ p >
43+ < p >
44+ < input type ="radio " id ="colour-blue " name ="tshirtColour " value ="blue " />
45+ < label for ="colour-blue "> Blue</ label >
46+ </ p >
5747
58- < p >
59- < input
60- type ="radio "
61- id ="colour-blue "
62- name ="tshirtColour "
63- value ="blue "
64- />
65- < label for ="colour-blue "> Blue</ label >
66- </ p >
48+ < p >
49+ < input type ="radio " id ="colour-green " name ="tshirtColour " value ="green " />
50+ < label for ="colour-green "> Green</ label >
51+ </ p >
52+ </ fieldset >
53+ < fieldset >
6754
68- < p >
69- < input
70- type ="radio "
71- id ="colour-green "
72- name ="tshirtColour "
73- value ="green "
74- />
75- < label for ="colour-green "> Green</ label >
76- </ p >
77- </ fieldset >
78- < fieldset >
55+ < legend > Choose a size</ legend >
7956
80- < legend > Choose a size</ legend >
57+ < p >
58+ < input type ="radio " id ="size-xs " name ="tshirtSize " value ="XS " required />
59+ < label for ="size-xs "> XS</ label >
60+ </ p >
8161
82- < p >
83- < input type ="radio " id ="size-xs " name ="tshirtSize " value ="XS " required />
84- < label for ="size-xs " > XS </ label >
85- </ p >
62+ < p >
63+ < input type ="radio " id ="size-s " name ="tshirtSize " value ="S " />
64+ < label for ="size-s " > S </ label >
65+ </ p >
8666
87- < p >
88- < input type ="radio " id ="size-s " name ="tshirtSize " value ="S " />
89- < label for ="size-s " > S </ label >
90- </ p >
67+ < p >
68+ < input type ="radio " id ="size-m " name ="tshirtSize " value ="M " />
69+ < label for ="size-m " > M </ label >
70+ </ p >
9171
92- < p >
93- < input type ="radio " id ="size-m " name ="tshirtSize " value ="M " />
94- < label for ="size-m " > M </ label >
95- </ p >
72+ < p >
73+ < input type ="radio " id ="size-l " name ="tshirtSize " value ="L " />
74+ < label for ="size-l " > L </ label >
75+ </ p >
9676
97- < p >
98- < input type ="radio " id ="size-l " name ="tshirtSize " value ="L " />
99- < label for ="size-l " > L </ label >
100- </ p >
77+ < p >
78+ < input type ="radio " id ="size-xl " name ="tshirtSize " value ="XL " />
79+ < label for ="size-xl " > XL </ label >
80+ </ p >
10181
102- < p >
103- < input type ="radio " id ="size-xl " name ="tshirtSize " value ="XL " />
104- < label for ="size-xl "> XL</ label >
105- </ p >
82+ < p >
83+ < input type ="radio " id ="size-xxl " name ="tshirtSize " value ="XXL " />
84+ < label for ="size-xxl "> XXL</ label >
85+ </ p >
86+ </ fieldset >
87+ < p >
88+ < button type ="submit "> Submit order</ button >
89+ </ p >
90+ </ form >
91+ </ main >
92+ < footer >
93+ <!-- change to your name-->
94+ < h2 > By Laura</ h2 >
95+ </ footer >
96+ </ body >
10697
107- < p >
108- < input type ="radio " id ="size-xxl " name ="tshirtSize " value ="XXL " />
109- < label for ="size-xxl "> XXL</ label >
110- </ p >
111- </ fieldset >
112- < p >
113- < button type ="submit "> Submit order</ button >
114- </ p >
115- </ form >
116- </ main >
117- < footer >
118- <!-- change to your name-->
119- < h2 > By Laura</ h2 >
120- </ footer >
121- </ body >
122- </ html >
98+ </ html >
0 commit comments