Skip to content

Commit 5b35052

Browse files
committed
Add form controls
1 parent c44123d commit 5b35052

1 file changed

Lines changed: 39 additions & 24 deletions

File tree

Form-Controls/index.html

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,42 @@
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>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>T-Shirt Order</title>
6+
<style>
7+
body { font-family: Arial, sans-serif; padding: 20px; }
8+
label { display: block; margin-top: 16px; font-weight: bold; }
9+
input, select { width: 100%; padding: 8px; margin-top: 4px; }
10+
button { margin-top: 20px; padding: 10px 20px; background: red; color: white; border: none; cursor: pointer; }
11+
</style>
12+
</head>
13+
<body>
14+
15+
<h1>Order a T-Shirt</h1>
16+
17+
<label for="name">Your Name</label>
18+
<input type="text" id="name" name="name" pattern=".*\S.*\S.*" required />
19+
20+
<label for="email">Your Email</label>
21+
<input type="email" id="email" name="email" required />
22+
23+
<label>Colour</label>
24+
<label><input type="radio" name="colour" value="red" required /> Red</label>
25+
<label><input type="radio" name="colour" value="blue" /> Blue</label>
26+
<label><input type="radio" name="colour" value="black" /> Black</label>
27+
28+
<label for="size">Size</label>
29+
<select id="size" name="size" required>
30+
<option value="">Pick a size</option>
31+
<option>XS</option>
32+
<option>S</option>
33+
<option>M</option>
34+
<option>L</option>
35+
<option>XL</option>
36+
<option>XXL</option>
37+
</select>
38+
39+
<button type="submit">Order Now</button>
40+
41+
</body>
2742
</html>

0 commit comments

Comments
 (0)