Skip to content

Commit 192cd43

Browse files
Add form elements for user input 2
1 parent 3725052 commit 192cd43

1 file changed

Lines changed: 34 additions & 4 deletions

File tree

Form-Controls/index.html

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,40 @@ <h1>Product Pick</h1>
1313
</header>
1414
<main>
1515
<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-->
16+
<label for="user-name">Your Name:</label>
17+
<input id="user-name", type="text", pattern="[A-Za-z\s]{2,}"
18+
title="Please enter at least 2 letters. Numbers and symbols are not allowed"
19+
required> </input>
20+
21+
<br>
22+
23+
<label for="email">Your Email:</label>
24+
<input id="email" type="email" required> </input>
25+
<button id="go"> Go
26+
</button>
27+
28+
<br>
29+
30+
<label for="colors">Choose your favorite color:</label>
31+
<select id="colors" name="colour" required>
32+
<option value="" disabled selected>Select a color...</option>
33+
<option value="red">Red</option>
34+
<option value="blue">Blue</option>
35+
<option value="green">Green</option>
36+
</select>
37+
38+
<br>
39+
40+
<label for="shirtsize">What size do you want?</label>
41+
42+
<select id="shirtsize" name="size" required>
43+
<option value="" disabled selected>Select a size...</option>
44+
<option value="red">S</option>
45+
<option value="blue">M</option>
46+
<option value="green">L</option>
47+
<option value="green">XL</option>
48+
<option value="green">XXL</option>
49+
</select>
2050
</form>
2151
</main>
2252
<footer>

0 commit comments

Comments
 (0)