|
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 | 6 | <title>My form exercise</title> |
7 | 7 | <meta name="description" content="" /> |
8 | 8 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
9 | | - <link rel="stylesheet" href="style.css"> |
| 9 | + <link rel="stylesheet" href="style.css" /> |
10 | 10 | </head> |
11 | 11 | <body> |
12 | 12 | <header> |
13 | 13 | <h1>Product Pick</h1> |
14 | 14 | </header> |
15 | 15 | <main> |
16 | 16 | <form> |
17 | | - <!-- write your html here--> |
18 | | - <!-- |
19 | | - try writing out the requirements first as comments |
20 | | - this will also help you fill in your PR message later |
21 | | - |
22 | | - requirements |
23 | | - -What is the customer's name? I must collect this data and ensure it contains at least two non-space characters |
24 | | - -What is the customer's email? I must make sure the email is valid. Email addresses follow a consistent pattern |
25 | | - -What colour should this T-shirt be? I must provide 3 options. How will I ensure they do not choose other colours? |
26 | | - -What size does the customer want? I must provide the following 6 options: XS, S, M, L, XL, XXL --> |
27 | | - <fieldset> |
28 | | - <legend>Customer Information</legend> |
29 | | - <p> |
30 | | - <label for="customerName">Customer Name</label> |
31 | | - <input id="customerName" name="customerName" type="text" pattern=".*\S.*\S.*" required> |
32 | | - </p> |
33 | | - <p> |
34 | | - <label for="emailAddress">Email Address</label> |
35 | | - <input id="emailAddress" name="emailAddress" type="email" required> |
36 | | - </p> |
| 17 | + <fieldset> |
| 18 | + <legend>Customer Information</legend> |
| 19 | + <p> |
| 20 | + <label for="customerName">Customer Name</label> |
| 21 | + <input |
| 22 | + id="customerName" |
| 23 | + name="customerName" |
| 24 | + type="text" |
| 25 | + pattern=".*\S.*\S.*" |
| 26 | + placeholder="username" |
| 27 | + required |
| 28 | + /> |
| 29 | + </p> |
| 30 | + <p> |
| 31 | + <label for="emailAddress">Email Address</label> |
| 32 | + <input |
| 33 | + id="emailAddress" |
| 34 | + name="emailAddress" |
| 35 | + type="email" |
| 36 | + placeholder="email" |
| 37 | + required |
| 38 | + /> |
| 39 | + </p> |
37 | 40 | </fieldset> |
38 | 41 | <fieldset> |
39 | | - <legend>T-shirt Colour and Size</legend> |
40 | | - <p> |
41 | | - <label for="red">Red</label> |
42 | | - <input type="radio" id="red" name="colour"> |
43 | | - </p> |
44 | | - <p> |
45 | | - <label for="green">Green</label> |
46 | | - <input type="radio" id="green" name="colour"> |
47 | | - </p> |
48 | | - <p> |
49 | | - <label for="blue">Blue</label> |
50 | | - <input type="radio" id="blue" name="colour"> |
51 | | - </p> |
52 | | - <p> |
53 | | - <label for="size">Tshirt Size</label> |
54 | | - <select id="size" name="size"> |
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 | | - </p> |
63 | | - |
64 | | - </fieldset> |
65 | | - |
| 42 | + <legend>T-shirt Colour and Size</legend> |
| 43 | + <p> |
| 44 | + <input type="radio" id="red" name="colour" value="red" required /> |
| 45 | + <label for="red">Red</label> |
| 46 | + </p> |
| 47 | + <p> |
| 48 | + <input type="radio" id="green" name="colour" value="green" /> |
| 49 | + |
| 50 | + <label for="green">Green</label> |
| 51 | + </p> |
| 52 | + <p> |
| 53 | + <input type="radio" id="blue" name="colour" value="blue" /> |
| 54 | + <label for="blue">Blue</label> |
| 55 | + </p> |
| 56 | + <p> |
| 57 | + <label for="size">T-shirt Size</label> |
| 58 | + <select id="size" name="size" required> |
| 59 | + <option value="" disabled selected>Select Size</option> |
| 60 | + <option value="XS">XS</option> |
| 61 | + <option value="S">S</option> |
| 62 | + <option value="M">M</option> |
| 63 | + <option value="L">L</option> |
| 64 | + <option value="XL">XL</option> |
| 65 | + <option value="XXL">XXL</option> |
| 66 | + </select> |
| 67 | + </p> |
| 68 | + </fieldset> |
| 69 | + <input type="submit" value="Submit" /> |
66 | 70 | </form> |
67 | 71 | </main> |
68 | 72 | <footer> |
69 | | - <!-- change to your name--> |
70 | 73 | <p>By AKLILU MIHTSUN</p> |
71 | 74 | </footer> |
72 | 75 | </body> |
|
0 commit comments