Skip to content

Commit 18b13ef

Browse files
Quentin GweleQuentin Gwele
authored andcommitted
Complete Form Controls task CYF-1004
1 parent 2615dee commit 18b13ef

1 file changed

Lines changed: 64 additions & 25 deletions

File tree

Form-Controls/index.html

Lines changed: 64 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,66 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="utf-8" />
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6-
<title>My form exercise</title>
7-
<meta name="description" content="" />
8-
<meta name="viewport" content="width=device-width, initial-scale=1" />
9-
</head>
10-
<body>
11-
<header>
12-
<h1>Product Pick</h1>
13-
</header>
14-
<main>
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-->
20-
</form>
21-
</main>
22-
<footer>
23-
<!-- change to your name-->
24-
<p>By HOMEWORK SOLUTION</p>
25-
</footer>
26-
</body>
27-
</html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>T-Shirt Order Form</title>
7+
</head>
8+
<body>
9+
<h1>T-Shirt Order Form</h1>
10+
11+
<form>
12+
<!-- 1. Customer Name (required, at least two non-space characters using pattern) -->
13+
<div>
14+
<label for="name">Full Name:</label>
15+
<input
16+
type="text"
17+
id="name"
18+
name="name"
19+
pattern=".*\S.*\S.*"
20+
required
21+
>
22+
</div>
23+
24+
<!-- 2. Customer Email (required, valid email format) -->
25+
<div>
26+
<label for="email">Email Address:</label>
27+
<input
28+
type="email"
29+
id="email"
30+
name="email"
31+
required
32+
>
33+
</div>
34+
35+
<!-- 3. T-shirt Colour (3 options using select dropdown) -->
36+
<div>
37+
<label for="colour">T-Shirt Colour:</label>
38+
<select id="colour" name="colour" required>
39+
<option value="">-- Please choose a colour --</option>
40+
<option value="red">Red</option>
41+
<option value="blue">Blue</option>
42+
<option value="black">Black</option>
43+
</select>
44+
</div>
45+
46+
<!-- 4. T-shirt Size (6 options: XS, S, M, L, XL, XXL) -->
47+
<div>
48+
<label for="size">T-Shirt Size:</label>
49+
<select id="size" name="size" required>
50+
<option value="">-- Please choose a size --</option>
51+
<option value="XS">XS</option>
52+
<option value="S">S</option>
53+
<option value="M">M</option>
54+
<option value="L">L</option>
55+
<option value="XL">XL</option>
56+
<option value="XXL">XXL</option>
57+
</select>
58+
</div>
59+
60+
<!-- Submit Button -->
61+
<div>
62+
<button type="submit">Submit Order</button>
63+
</div>
64+
</form>
65+
</body>
66+
</html>

0 commit comments

Comments
 (0)