Skip to content

Commit 80fdcba

Browse files
committed
Added requirements and changed tags <div> to <section>
1 parent 181ea79 commit 80fdcba

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

Form-Controls/index.html

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,31 @@
1212
<main>
1313

1414
<form method="get" class="container">
15+
<!-- Requirements:
16+
- What is the customer's name? I must collect this data and ensure it contains at least two non-space characters.
17+
- What is the customer's email? I must make sure the email is valid. Email addresses follow a consistent pattern.
18+
- What colour should this T-shirt be? I must provide 3 options and to ensure they do not choose other colours.
19+
- What size does the customer want? I must provide the following 6 options: XS, S, M, L, XL, XXL and to ensure they do not choose other sizes.
20+
-->
21+
1522
<header>
1623
<h1>T-shirt Order Form</h1>
1724
</header>
1825
<main>
1926
<form>
2027

21-
<div>
28+
<section>
2229
<label for="name">Full Name</label>
2330
<input id="name" name="name" type="text" minlength="2" placeholder="First Name Surname" pattern="[A-Za-z ]{2,}" required>
24-
</div>
31+
</section>
2532

26-
<div>
33+
<section>
2734
<label for="email">Email</label>
2835
<input id="email" name="email" type="email" pattern="[A-Za-z0-9._%+\-]+@[A-Za-z0-9.\-]+\.[A-Za-z]{2,}$"
2936
placeholder="Your email" required>
30-
</div>
37+
</section>
3138

32-
<div>
39+
<section>
3340
<label for="colour">T-shirt Colour:</label>
3441

3542
<select name="colour" id="colour" required>
@@ -38,9 +45,9 @@ <h1>T-shirt Order Form</h1>
3845
<option value="Blue">Blue</option>
3946
<option value="Yellow">Yellow</option>
4047
</select>
41-
</div>
48+
</section>
4249

43-
<div>
50+
<section>
4451
<label for="Size">T-shirt Size:</label>
4552
<select name="size" id="Size" required>
4653
<option value="">Choose a Size</option>
@@ -51,13 +58,12 @@ <h1>T-shirt Order Form</h1>
5158
<option value="XL">XL</option>
5259
<option value="XXL">XXL</option>
5360
</select>
54-
</div>
61+
</section>
5562

56-
</div>
63+
<hr>
5764

5865

5966
<button type="submit">Submit</button>
60-
</div>
6167

6268
<!-- write your html here-->
6369
<!--

0 commit comments

Comments
 (0)