|
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html lang="en"> |
3 | 3 | <head> |
| 4 | + <link rel="stylesheet" href="./style.css" > |
4 | 5 | <meta charset="utf-8" /> |
5 | 6 | <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
6 | 7 | <title>My form exercise</title> |
7 | 8 | <meta name="description" content="" /> |
8 | 9 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 10 | + <style> |
| 11 | + input:valid{ |
| 12 | + border:2px solid green; |
| 13 | +} |
| 14 | +input:invalid{ |
| 15 | + border:2px solid red; |
| 16 | + } |
| 17 | + </style> |
9 | 18 | </head> |
10 | 19 | <body> |
11 | 20 | <header> |
12 | 21 | <h1>Product Pick</h1> |
13 | 22 | </header> |
14 | 23 | <main> |
15 | 24 | <form> |
16 | | - <!-- write your html here--> |
17 | | - <!-- |
18 | | - try writing out the requirements first as comments |
19 | | - this will also help you fill in your PR message later--> |
| 25 | + <!-- --> |
| 26 | + <label for="customername">Customer name: </label> |
| 27 | + <input type="text" id="customername" name="customername" required |
| 28 | + pattern="^[a-zA-Z]+ [a-zA-Z]+$" |
| 29 | + placeholder="Customer name" |
| 30 | + /> |
| 31 | + <br /> |
| 32 | + <label for="customeremail">Customer email: </label> |
| 33 | + <input type="email" id="customeremail" name="customeremail" required |
| 34 | + pattern="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$" |
| 35 | + placeholder="Customer email" /> |
| 36 | + <br /> |
| 37 | + <fieldset> |
| 38 | + <legend>T-shirt Colors</legend> |
| 39 | + <input type="radio" id="black" name="colors" value="BLACK"> |
| 40 | + <label for="black">BLACK</label> |
| 41 | + <input type="radio" id="bLue" name="colors" value="BLUE"> |
| 42 | + <label for="blue">BLUE</label> |
| 43 | + <input type="radio" id="red" name="colors" value="RED"> |
| 44 | + <label for="red">RED</label> |
| 45 | + </fieldset> |
| 46 | + <select name="size" id="sizes"> |
| 47 | + <option value="xs">XS</option> |
| 48 | + <option value="s">S</option> |
| 49 | + <option value="m">M</option> |
| 50 | + <option value="l">L</option> |
| 51 | + <option value="XL">XL</option> |
| 52 | + <option vallue="XXL">XXL</optio> |
| 53 | + </select> |
20 | 54 | </form> |
21 | 55 | </main> |
22 | 56 | <footer> |
23 | 57 | <!-- change to your name--> |
24 | | - <p>By HOMEWORK SOLUTION</p> |
| 58 | + <p>By Yonas Gebre</p> |
25 | 59 | </footer> |
26 | 60 | </body> |
27 | 61 | </html> |
0 commit comments