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 ="T-shirt order form " />
8- < meta name ="viewport " content ="width=device-width, initial-scale=1 " />
9- </ head >
10- < body >
11- < header >
12- < h1 > Product Pick</ h1 >
13- </ header >
143
15- < main >
16- < form >
17- <!-- write your html here-->
18- <!-- Customer Name -->
19- <!-- Customer Name -->
20- < label for ="name "> Full Name:</ label >
21- < input
22- type ="text "
23- id ="name "
24- name ="name "
25- required
26- minlength ="2 "
27- pattern =".*\S.* "
28- placeholder ="Enter your full name "
29- />
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 ="T-Shirt Order Form " />
9+ < meta name ="viewport " content ="width=device-width, initial-scale=1 " />
10+ </ head >
3011
31- < br /> < br />
12+ < body >
13+ < header >
14+ < h1 > Product Pick</ h1 >
15+ </ header >
16+ < main >
17+ < form >
18+ <!-- Customer Name Input -->
19+ < p >
20+ < label for ="customerName "> Name:</ label >
21+ < input type ="text " id ="customerName " name ="customerName " required minlength ="2 "
22+ placeholder ="Enter your full name ">
23+ </ p >
3224
33- <!-- Email -->
34- < label for ="email "> Email Address:</ label >
35- < input
36- type ="email "
37- id ="email "
38- name ="email "
39- required
40- placeholder ="example@example.com "
41- />
42- < br /> < br />
25+ <!-- Customer Email Input -->
26+ < p >
27+ < label for ="emailAddress "> Email:</ label >
28+ < input type ="email " id ="emailAddress " name ="emailAddress " required placeholder ="you@example.com "
29+ pattern ="^[a-zA-Z0-9._%+-]+@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+([a-zA-Z]{2,63})$ "
30+ title ="Please enter a valid email address (e.g., user@example.com). Domain parts (like 'example') must start and end with a letter or number, can contain hyphens, and must be separated by dots. Ends with a top-level domain (e.g., .com). ">
31+ </ p >
4332
44- <!-- T-shirt Colour -->
45- < fieldset >
46- < legend > Choose your T-shirt colour:</ legend >
47- < input type ="radio " id ="red " name ="color " value ="Red " required />
48- < label for ="red "> Red</ label > < br />
33+ <!-- T-Shirt Colour Selection -->
34+ < fieldset >
35+ < legend > Choose T-Shirt Colour:</ legend >
36+ < p >
37+ < input type ="radio " id ="colourRed " name ="shirtColour " value ="red " required >
38+ < label for ="colourRed "> Red</ label >
39+ </ p >
40+ < p >
41+ < input type ="radio " id ="colourBlue " name ="shirtColour " value ="blue ">
42+ < label for ="colourBlue "> Blue</ label >
43+ </ p >
44+ < p >
45+ < input type ="radio " id ="colourGreen " name ="shirtColour " value ="green ">
46+ < label for ="colourGreen "> Green</ label >
47+ </ p >
48+ </ fieldset >
4949
50- < input type ="radio " id ="blue " name ="color " value ="Blue " />
51- < label for ="blue "> Blue</ label > < br />
52-
53- < input type ="radio " id ="black " name ="color " value ="Black " />
54- < label for ="black "> Black</ label >
55- </ fieldset >
56- < br />
57-
58- <!-- T-shirt Size -->
59- < label for ="size "> Choose your T-shirt size:</ label >
60- < select id ="size " name ="size " required >
61- < option value ="" disabled selected > Select size</ option >
62- < option value ="XS "> XS</ option >
63- < option value ="S "> S</ option >
64- < option value ="M "> M</ option >
65- < option value ="L "> L</ option >
66- < option value ="XL "> XL</ option >
67- < option value ="XXL "> XXL</ option >
50+ <!-- T-Shirt Size Selection -->
51+ < p >
52+ < label for ="shirtSize "> Choose Size:</ label >
53+ < select id ="shirtSize " name ="shirtSize " required >
54+ < option value =""> -- Please choose a size --</ option >
55+ < option value ="xs "> XS</ option >
56+ < option value ="s "> S</ option >
57+ < option value ="m "> M</ option >
58+ < option value ="l "> L</ option >
59+ < option value ="xl "> XL</ option >
60+ < option value ="xxl "> XXL</ option >
6861 </ select >
69- < br /> < br />
62+ </ p >
63+
64+ <!-- Submit Section Button -->
65+ < p >
66+ < button type ="submit "> Place Order</ button >
67+ </ p >
68+ </ form >
69+ </ main >
70+ < footer >
71+ < h2 > By Gideon Defar</ h2 >
72+ </ footer >
73+ </ body >
7074
71- < button type ="submit "> Submit Order</ button >
72- <!--
73- try writing out the requirements first as comments
74- this will also help you fill in your PR message later-->
75- </ form >
76- </ main >
77- < footer >
78- <!-- change to your name-->
79- < h2 > By HOMEWORK SOLUTION</ h2 >
80- </ footer >
81- </ body >
82- </ html >
75+ </ html >
0 commit comments