Skip to content
16 changes: 8 additions & 8 deletions Form-Controls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ Do not write a form action for this project.

Let's write out our testable criteria. Check each one off as you complete it.

- [ ] I have used HTML only.
- [x] I have used HTML only.
- [x] I have not used any CSS or JavaScript.

### HTML

- [ ] My form is semantic html.
- [ ] All inputs have associated labels.
- [ ] My Lighthouse Accessibility score is 100.
- [ ] I require a valid name. I have defined a valid name as a text string of two characters or more.
- [ ] I require a valid email.
- [ ] I require one colour from a defined set of 3 colours.
- [ ] I require one size from a defined set of 6 sizes.
- [x] My form is semantic html.
- [x] All inputs have associated labels.
- [x] My Lighthouse Accessibility score is 100.
- [x] I require a valid name. I have defined a valid name as a text string of two characters or more.
- [x] I require a valid email.
- [x] I require one colour from a defined set of 3 colours.
- [x] I require one size from a defined set of 6 sizes.

## Resources

Expand Down
44 changes: 38 additions & 6 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,49 @@
<header>
<h1>Product Pick</h1>
</header>

<main>
<form>
<!-- write your html here-->
<!--
try writing out the requirements first as comments
this will also help you fill in your PR message later-->
<div>
<label for="name">Name</label>
<input type="text" name="name" id="name" required minlength="2" pattern="[A-Za-z\s]+">
</div>
<br>
<div>
<label for="email">Email</label>
<input type="email" name="email" id="email" required pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}">
</div>
<br>

<div>
<label for="colour">Colour</label>
<select name="colour" id="colour" required>
<option value="white">White</option>
<option value="black">Black</option>
<option value="Green">Green</option>
</select>
</div>
<br>

<div>
<label for="size">Size</label>
<select name="size" id="size" required>
<option value="xs">XS</option>
<option value="s">S</option>
<option value="m">M</option>
<option value="l">L</option>
<option value="xl">XL</option>
<option value="xxl">XXL</option>
</select>
</div>
<br>

<button type="submit">Sumbit</button>
</form>
</main>

<footer>
<!-- change to your name-->
<h2>By HOMEWORK SOLUTION</h2>
<h2>By Asha Ahmed</h2>
</footer>
</body>
</html>