|
1 | | -<!DOCTYPE html> |
| 1 | +<!doctype html> |
2 | 2 | <html lang="en"> |
3 | 3 | <head> |
4 | 4 | <meta charset="utf-8" /> |
5 | 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
6 | | - <title>My form exercise</title> |
7 | | - <meta name="description" content="" /> |
| 6 | + <title>T-Shirt Order Form</title> |
| 7 | + <meta name="description" content="T-Shirt order form" /> |
8 | 8 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
9 | 9 | </head> |
| 10 | + |
10 | 11 | <body> |
11 | 12 | <header> |
12 | 13 | <h1>Product Pick</h1> |
13 | 14 | </header> |
| 15 | + |
14 | 16 | <main> |
15 | 17 | <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--> |
| 18 | + <!-- Customer name: at least two non-space characters --> |
| 19 | + <label for="customer-name">Name</label> |
| 20 | + <input |
| 21 | + type="text" |
| 22 | + id="customer-name" |
| 23 | + name="customer-name" |
| 24 | + pattern=".*\S.*\S.*" |
| 25 | + required |
| 26 | + /> |
| 27 | + |
| 28 | + <!-- Customer email: must be a valid email --> |
| 29 | + <label for="customer-email">Email</label> |
| 30 | + <input |
| 31 | + type="email" |
| 32 | + id="customer-email" |
| 33 | + name="customer-email" |
| 34 | + required |
| 35 | + /> |
| 36 | + |
| 37 | + <!-- T-shirt colour: choose one of three options --> |
| 38 | + <fieldset> |
| 39 | + <legend>T-Shirt Colour</legend> |
| 40 | + |
| 41 | + <input type="radio" id="red" name="colour" value="red" required /> |
| 42 | + <label for="red">Red</label> |
| 43 | + |
| 44 | + <input type="radio" id="blue" name="colour" value="blue" /> |
| 45 | + <label for="blue">Blue</label> |
| 46 | + |
| 47 | + <input type="radio" id="black" name="colour" value="black" /> |
| 48 | + <label for="black">Black</label> |
| 49 | + </fieldset> |
| 50 | + |
| 51 | + <!-- T-shirt size: choose one of six options --> |
| 52 | + <label for="size">Size</label> |
| 53 | + <select id="size" name="size" required> |
| 54 | + <option value="">Select 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> |
| 61 | + </select> |
| 62 | + |
| 63 | + <button type="submit">Submit Order</button> |
20 | 64 | </form> |
21 | 65 | </main> |
| 66 | + |
22 | 67 | <footer> |
23 | | - <!-- change to your name--> |
24 | | - <p>By HOMEWORK SOLUTION</p> |
| 68 | + <p>By Eunice Mutanda</p> |
25 | 69 | </footer> |
26 | 70 | </body> |
27 | 71 | </html> |
0 commit comments