|
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" /> |
6 | | - <title>My form exercise</title> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 6 | + <title>My Form Exercise</title> |
7 | 7 | <meta name="description" content="" /> |
8 | | - <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 8 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 9 | + <style> |
| 10 | + body { |
| 11 | + font-family: Arial, sans-serif; |
| 12 | + margin: 20px; |
| 13 | + } |
| 14 | + header, footer { |
| 15 | + text-align: center; |
| 16 | + margin-bottom: 20px; |
| 17 | + } |
| 18 | + form { |
| 19 | + max-width: 400px; |
| 20 | + margin: 0 auto; |
| 21 | + padding: 20px; |
| 22 | + border: 1px solid #ccc; |
| 23 | + border-radius: 5px; |
| 24 | + } |
| 25 | + div { |
| 26 | + margin-bottom: 15px; |
| 27 | + } |
| 28 | + label { |
| 29 | + display: block; |
| 30 | + margin-bottom: 5px; |
| 31 | + } |
| 32 | + input[type="text"], |
| 33 | + input[type="email"], |
| 34 | + select { |
| 35 | + width: 100%; |
| 36 | + padding: 8px; |
| 37 | + box-sizing: border-box; |
| 38 | + } |
| 39 | + button { |
| 40 | + padding: 10px 20px; |
| 41 | + background-color: black; |
| 42 | + color: white; |
| 43 | + border: none; |
| 44 | + border-radius: 5px; |
| 45 | + cursor: pointer; |
| 46 | + } |
| 47 | + button:hover { |
| 48 | + background-color: navy; |
| 49 | + } |
| 50 | + </style> |
9 | 51 | </head> |
10 | 52 | <body> |
11 | 53 | <header> |
12 | | - <h1>Product Pick</h1> |
| 54 | + <h1>Pick Your Favourite T-Shirt</h1> |
13 | 55 | </header> |
14 | 56 | <main> |
15 | 57 | <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--> |
| 58 | + <div> |
| 59 | + <label for="name"> Your Name:</label> |
| 60 | + <input type="text" id="name" name="name" placeholder="Enter Your Name" pattern="\S{2,}" required/> |
| 61 | + </div> |
| 62 | + <div> |
| 63 | + <label for="email"> Your Email:</label> |
| 64 | + <input type="email" id="email" name="email" placeholder="Enter Your Email" required/> |
| 65 | + </div> |
| 66 | + Pick Your Favourite Color: |
| 67 | + <div> |
| 68 | + <label for="color-red">Red</label> |
| 69 | + <input type="radio" id="color-red" name="color" value="red" required/> |
| 70 | + </div> |
| 71 | + <div> |
| 72 | + <div> |
| 73 | + <label for="color-green">Green</label> |
| 74 | + <input type="radio" id="color-green" name="color" value="green" required/> |
| 75 | + </div> |
| 76 | + <label for="color-black">Black</label> |
| 77 | + <input type="radio" id="color-black" name="color" value="black" required/> |
| 78 | + </div> |
| 79 | + <div> |
| 80 | + <label for="size"> Choose Your T-Shirt Size:</label> |
| 81 | + <select id="size" name="size" required> |
| 82 | + <option value="">Select Size</option> |
| 83 | + <option value="xsmall">XS</option> |
| 84 | + <option value="small">S</option> |
| 85 | + <option value="medium">M</option> |
| 86 | + <option value="large">L</option> |
| 87 | + <option value="xlarge">XL</option> |
| 88 | + <option value="xxlarge">XXL</option> |
| 89 | + </select> |
| 90 | + </div> |
| 91 | + <button type="submit">Submit</button> |
20 | 92 | </form> |
21 | 93 | </main> |
22 | 94 | <footer> |
23 | 95 | <!-- change to your name--> |
24 | | - <p>By HOMEWORK SOLUTION</p> |
| 96 | + <p>By Yonatan Teklemariam</p> |
25 | 97 | </footer> |
26 | 98 | </body> |
27 | 99 | </html> |
0 commit comments