Skip to content

Commit 2f149c6

Browse files
committed
Complete form control
1 parent a7b8a25 commit 2f149c6

1 file changed

Lines changed: 69 additions & 25 deletions

File tree

Form-Controls/index.html

Lines changed: 69 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,71 @@
1-
<!DOCTYPE html>
1+
<!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+
<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 aria-label="order form">
16+
<label for="name">name: </label>
17+
<input
18+
type="text"
19+
name="name"
20+
id="name"
21+
minlength="2"
22+
maxlength="100"
23+
autocomplete="name"
24+
pattern="\S.*\S"
25+
title="name must contain at least two non-space characters. Must start and end with non-space character."
26+
aria-label="enter your name"
27+
required />
28+
29+
<label for="email">email: </label>
30+
<input
31+
type="email"
32+
name="email"
33+
id="email"
34+
aria-label="enter your email address"
35+
required />
36+
37+
<label for="shirt-color">shirt color: </label>
38+
<select
39+
name="shirt-color"
40+
id="shirt-color"
41+
aria-label="select shirt color"
42+
required>
43+
<option value="" disabled selected>Choose a color</option>
44+
<option value="red">red</option>
45+
<option value="green">green</option>
46+
<option value="blue">blue</option>
47+
</select>
48+
<select
49+
name="shirt-size"
50+
id="shirt-size"
51+
aria-label="select shirt size"
52+
required>
53+
<option value="" disabled selected>Choose a size</option>
54+
<option value="xs">XS</option>
55+
<option value="s">S</option>
56+
<option value="m">M</option>
57+
<option value="l">L</option>
58+
<option value="xl">XL</option>
59+
<option value="xxl">XXL</option>
60+
</select>
61+
<button type="submit" aria-label="submit order">
62+
Check out
63+
</button>
64+
</form>
65+
</main>
66+
<footer>
67+
<!-- change to your name-->
68+
<p>By Raihan Sharif</p>
69+
</footer>
70+
</body>
2771
</html>

0 commit comments

Comments
 (0)