66 < title > My form exercise</ title >
77 < meta name ="description " content ="" />
88 < meta name ="viewport " content ="width=device-width, initial-scale=1 " />
9+ < style >
10+ /* write your css here */
11+ input : valid {
12+ border : 2px solid green;
13+ }
14+ input : invalid {
15+ border : 2px solid red;
16+ }
17+ </ style >
918 </ head >
1019 < body >
1120 < header >
@@ -14,7 +23,35 @@ <h1>Product Pick</h1>
1423 < main >
1524 < form >
1625 < label for ="product-name "> Product Name:</ label >
17- < input type ="text " name ="product-name " placeholder ="Product Name " required />
26+ < input type ="text " id ="product-name " placeholder ="Product Name " required pattern ="^[a-zA-Z\s]+$ " maxlength ="20 " minlength ="2 "/>
27+ < br >
28+ < br >
29+ < label for ="email-add "> Email Address:</ label >
30+ < input type ="email " id ="email-add " placeholder ="Email Address " required />
31+ < br >
32+ < br >
33+ < label > T shirt color:</ label >
34+ < select name ="color " required >
35+ < option value =""> Select a color</ option >
36+ < option value ="red "> Red</ option >
37+ < option value ="blue "> Blue</ option >
38+ < option value ="green "> Green</ option >
39+ </ select >
40+ < br >
41+ < br >
42+ < label > T shirt size: </ label >
43+ < select name ="size " required >
44+ < option value =""> Select a size</ option >
45+ < option value ="extra-small "> XS</ option >
46+ < option value ="small "> S</ option >
47+ < option value ="medium "> M</ option >
48+ < option value ="large "> L</ option >
49+ < option value ="extra-large "> XL</ option >
50+ < option value ="double-extra-large "> XXL</ option >
51+ </ select >
52+ < br >
53+ < br >
54+ < input type ="submit " value ="Submit ">
1855 <!-- write your html here-->
1956 <!--
2057 try writing out the requirements first as comments
@@ -23,7 +60,7 @@ <h1>Product Pick</h1>
2360 </ main >
2461 < footer >
2562 <!-- change to your name-->
26- < p > By HOMEWORK SOLUTION </ p >
63+ < p > By Fahman ALQADASI </ p >
2764 </ footer >
2865 </ body >
2966</ html >
0 commit comments