|
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> |
| 6 | + <title>T-Shirt Order Form</title> |
7 | 7 | <meta name="description" content="" /> |
8 | 8 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
9 | 9 | </head> |
10 | 10 | <body> |
11 | 11 | <header> |
12 | | - <h1>Product Pick</h1> |
| 12 | + <h1>Order Your CYF T-Shirt</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 | + <div class"form-group"> |
| 17 | + <label for"customer-name">Full Name</label> |
| 18 | + <input |
| 19 | + type"text" |
| 20 | + id="customer-name" |
| 21 | + required |
| 22 | + pattern=".*\S.*\S.*" |
| 23 | + title"Name must contain at least two non-space characters."> |
| 24 | + </div> |
| 25 | + |
| 26 | + <div class="form-group"> |
| 27 | + <label for="customer-email">Email Address</label> |
| 28 | + <input |
| 29 | + type="email" |
| 30 | + id="customer-email" |
| 31 | + name="customer-email" |
| 32 | + required> |
| 33 | + </div> |
| 34 | + </fieldset> |
| 35 | + |
| 36 | + <!-- Section 2: T-Shirt Customization --> |
| 37 | + <fieldset> |
| 38 | + <legend>T-Shirt Options</legend> |
| 39 | + |
| 40 | + <!-- Colour Selection (Dropdown) --> |
| 41 | + <div class="form-group"> |
| 42 | + <label for="tshirt-color">Choose a Colour</label> |
| 43 | + <select id="tshirt-color" name="tshirt-color" required> |
| 44 | + <option value="" disabled selected>Select a colour...</option> |
| 45 | + <option value="black">Classic Black</option> |
| 46 | + <option value="blue">CYF Blue</option> |
| 47 | + <option value="white">Minimalist White</option> |
| 48 | + </select> |
| 49 | + </div> |
| 50 | + |
| 51 | + <!-- Size Selection (Radio Buttons) --> |
| 52 | + <div class="form-group"> |
| 53 | + <span class="label-heading">Select Your Size</span> |
| 54 | + |
| 55 | + <div class="radio-options"> |
| 56 | + <label><input type="radio" name="tshirt-size" value="XS" required> XS</label> |
| 57 | + <label><input type="radio" name="tshirt-size" value="S"> S</label> |
| 58 | + <label><input type="radio" name="tshirt-size" value="M"> M</label> |
| 59 | + <label><input type="radio" name="tshirt-size" value="L"> L</label> |
| 60 | + <label><input type="radio" name="tshirt-size" value="XL"> XL</label> |
| 61 | + <label><input type="radio" name="tshirt-size" value="XXL"> XXL</label> |
| 62 | + </div> |
| 63 | + </div> |
| 64 | + </fieldset> |
| 65 | + |
| 66 | + <button type="submit">Confirm Order</button> |
20 | 67 | </form> |
21 | 68 | </main> |
22 | 69 | <footer> |
23 | | - <!-- change to your name--> |
| 70 | + <!-- Wing Ting Huang--> |
24 | 71 | <p>By HOMEWORK SOLUTION</p> |
25 | 72 | </footer> |
26 | 73 | </body> |
|
0 commit comments