Skip to content

Commit 8497414

Browse files
committed
Updated form semantics
1 parent 297191f commit 8497414

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

Form-Controls/index.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,26 @@ <h1>Product Pick</h1>
3939
[x] Customer email = requires a consistent pattern
4040
[x] T-shirt color = required to choose from only 3 options!
4141
[x] T-shirt size = required to choose from only 6 sizes! -->
42-
<div>
42+
<fieldset>
43+
<legend>Customer Details</legend>
44+
4345
<label for="name">Full name: </label>
4446
<input id="name" name="name" required pattern=".*\S.*\S.*" />
45-
</div>
46-
<div>
47+
4748
<label for="email">E-mail: </label>
4849
<input id="email" name="email" type="email" required />
49-
</div>
50-
<div>
50+
</fieldset>
51+
<fieldset>
52+
<legend>T-shirt Details</legend>
53+
5154
<label for="t-shirt-colour">Please select a t-shirt colour:</label>
5255
<select id="t-shirt-colour" name="colour" required>
5356
<option value="">Colour</option>
5457
<option>Burgundy</option>
5558
<option>Forest Green</option>
5659
<option>Ochre Yellow</option>
5760
</select>
58-
</div>
59-
<div>
61+
6062
<label for="t-shirt-size">Please select a size</label>
6163
<select id="t-shirt-size" name="size" required>
6264
<option value="">Size</option>
@@ -67,7 +69,8 @@ <h1>Product Pick</h1>
6769
<option>XL</option>
6870
<option>XXL</option>
6971
</select>
70-
</div>
72+
</fieldset>
73+
7174
<button>Submit</button>
7275
</form>
7376
</main>

0 commit comments

Comments
 (0)