|
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html lang="en"> |
3 | 3 | <head> |
4 | | - <meta charset="utf-8" /> |
5 | | - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
| 4 | + <meta charset="utf-8" > |
| 5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge" > |
6 | 6 | <title>My form exercise</title> |
7 | | - <meta name="description" content="" /> |
8 | | - <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 7 | + <meta name="description" content="" > |
| 8 | + <meta name="viewport" content="width=device-width, initial-scale=1" > |
9 | 9 | </head> |
10 | 10 | <body> |
11 | 11 | <header> |
12 | 12 | <h1>Product Pick</h1> |
13 | 13 | </header> |
14 | 14 | <main> |
15 | 15 | <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--> |
| 16 | + <!-- Add input for name - required and validate --> |
| 17 | + <label> |
| 18 | + Name |
| 19 | + <input type="text" name="name" required> |
| 20 | + </label> |
| 21 | + <label> |
| 22 | + <!-- Add input for email - required and validate --> |
| 23 | + Email |
| 24 | + <input type="email" name="email" required> |
| 25 | + </label> |
| 26 | + <!-- Drop down list of 3 colours (green, blue, red) - required --> |
| 27 | + <label for="colour">Choose a colour:</label> |
| 28 | + <select name="colour" id="colour" required> |
| 29 | + <option value="" disabled selected>Select a colour</option> |
| 30 | + <option value="red">Red</option> |
| 31 | + <option value="green">Green</option> |
| 32 | + <option value="blue">Blue</option> |
| 33 | + </select> |
| 34 | + <!-- Drop down list of 6 sizes (XS, S, M, L, XL, XXL) - required --> |
| 35 | + <label for="size">Choose a size:</label> |
| 36 | + <select name="size" id="size" required> |
| 37 | + <option value="" disabled selected>Select a size</option> |
| 38 | + <option value="xs">XS</option> |
| 39 | + <option value="s">S</option> |
| 40 | + <option value="m">M</option> |
| 41 | + <option value="l">L</option> |
| 42 | + <option value="xl">XL</option> |
| 43 | + <option value="xxl">XXL</option> |
| 44 | + </select> |
| 45 | + <button type="submit">Submit</button> |
20 | 46 | </form> |
21 | 47 | </main> |
22 | 48 | <footer> |
23 | 49 | <!-- change to your name--> |
24 | | - <p>By HOMEWORK SOLUTION</p> |
| 50 | + <p>By Martin Mwaka</p> |
25 | 51 | </footer> |
26 | 52 | </body> |
27 | 53 | </html> |
0 commit comments