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- < link rel ="preconnect " href ="https://fonts.googleapis.com ">
10- < link rel ="preconnect " href ="https://fonts.gstatic.com " crossorigin >
11- < link href ="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap " rel ="stylesheet ">
12- < link rel ="stylesheet " href ="style.css ">
13- </ head >
14- < body >
15- < header >
16- < h1 > Product Pick</ h1 >
17- </ header >
18- < main >
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6+ < link rel ="preconnect " href ="https://fonts.googleapis.com ">
7+ < link rel ="preconnect " href ="https://fonts.gstatic.com " crossorigin ="">
8+ < link href ="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap " rel ="stylesheet ">
9+ < link rel ="stylesheet " href ="style.css ">
10+ < title > Document</ title >
11+ </ head >
12+ < body >
13+ < header >
14+ < h1 > Product Pick</ h1 >
15+ </ header >
16+ < main >
1917 < form >
2018 < div class ="form-group ">
21- <!-- Add input for name - required and validate -->
19+ <!-- input for name - required and validate -->
2220 < label for ="name "> Name</ label >
23- < input type ="text " id ="name " placeholder ="Joe Bloggs " required >
21+ < input type ="text "
22+ id ="name "
23+ placeholder ="Joe Bloggs "
24+ required pattern ="^(?=(?:.*\S){2,}).*$ "
25+ title ="Please enter at least 2 non-space characters ">
2426 </ div >
2527 < div class ="form-group ">
26- <!-- Add input for email - required and validate -->
28+ <!-- input for email - required and validate -->
2729 < label for ="email "> Email</ label >
28- < input type ="email " id ="email " placeholder ="joe@me.com " required >
30+ < input type ="email " id ="email " placeholder ="joe@me.com " required ="" >
2931 </ div >
3032 < div class ="form-group ">
3133 <!-- Drop down list of 3 colours (green, blue, red) - required -->
3234 < label for ="colour "> Choose colour</ label >
33- < select name ="colour " id ="colour " required >
34- < option value ="" disabled selected > Select a colour</ option >
35+ < select name ="colour " id ="colour " required ="" >
36+ < option value ="" disabled ="" selected ="" > Select a colour</ option >
3537 < option value ="red "> Red</ option >
3638 < option value ="green "> Green</ option >
3739 < option value ="blue "> Blue</ option >
@@ -41,8 +43,8 @@ <h1>Product Pick</h1>
4143 < div class ="form-group ">
4244 <!-- Drop down list of 6 sizes (XS, S, M, L, XL, XXL) - required -->
4345 < label for ="size "> Choose size</ label >
44- < select name ="size " id ="size " required >
45- < option value ="" disabled selected > Select a size</ option >
46+ < select name ="size " id ="size " required ="" >
47+ < option value ="" disabled ="" selected ="" > Select a size</ option >
4648 < option value ="xs "> XS</ option >
4749 < option value ="s "> S</ option >
4850 < option value ="m "> M</ option >
@@ -55,8 +57,12 @@ <h1>Product Pick</h1>
5557 </ form >
5658 </ main >
5759 < footer >
58- <!-- change to your name-->
5960 < p > By Martin Mwaka</ p >
6061 </ footer >
61- </ body >
62+ </ body >
6263</ html >
64+
65+
66+
67+
68+
0 commit comments