Skip to content
38 changes: 19 additions & 19 deletions Form-Controls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

<!--{{<objectives>}}>-->

- [ ] Interpret requirements and check against a list of criteria
- [ ] Write a valid form
- [ ] Test with Devtools
- [ ] Refactor using Devtools
- [ ] Use version control by committing often and pushing regularly to GitHub
- [ ] Develop the habit of writing clean, well-structured, and error-free code
- [x] Interpret requirements and check against a list of criteria
- [x] Write a valid form
- [x] Test with Devtools
- [x] Refactor using Devtools
- [x] Use version control by committing often and pushing regularly to GitHub
- [x] Develop the habit of writing clean, well-structured, and error-free code
<!--{{<objectives>}}>-->

## Task
Expand All @@ -34,18 +34,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 only used HTML and CSS.
- [ ] I have not used any JavaScript.
- [x] I have only used HTML and CSS.
- [x] I have not used any JavaScript.

### HTML

- [ ] My form is semantic HTML.
- [ ] All inputs have associated labels.
- [ ] My Lighthouse Accessibility score is 100.
- [ ] I require a valid name.
- [ ] 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.
- [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.

### Developers must adhere to professional standards.

Expand All @@ -54,10 +54,10 @@ Let's write out our testable criteria. Check each one off as you complete it.
These practices reflect the level of quality expected in professional work.
They ensure your code is reliable, maintainable, and presents a polished, credible experience to users.

- [ ] My HTML code has no errors or warnings when validated using https://validator.w3.org/
- [ ] My code is consistently formatted
- [ ] My page content is free of typos and grammatical mistakes
- [ ] I commit often and push regularly to GitHub
- [x] My HTML code has no errors or warnings when validated using https://validator.w3.org/
- [x] My code is consistently formatted
- [x] My page content is free of typos and grammatical mistakes
- [x] I commit often and push regularly to GitHub

## Resources
- [MDN: Form controls](https://developer.mozilla.org/en-US/docs/Learn/Forms)
Expand Down
53 changes: 47 additions & 6 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,56 @@ <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-->
<!-- Name Input -->
<div>
<label for="name">Name</label>
<input type="text" name="name" id="name" minlength="2" required>
</div>
<br>

<!-- Email Input -->
<div>
<label for="email">Email</label>
<input type="email" name="email" id="email" required>
</div>
<br>

<!-- Color Select -->
<div>
<label for="colour">Colour</label>
</div>
<div>
<label for="red">Red</label>
<input type="radio" name="colour" id="red" value="red" required>
<label for="green">Green</label>
<input type="radio" name="colour" id="green" value="green">
<label for="blue">Blue</label>
<input type="radio" name="colour" id="blue" value="blue">
</div>
<br>

<!-- Size Select -->
<div>
<label for="size">Size</label>
<select name="size" id="size" required>
<option value="" selected>Select Size</option>
<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>

<!-- Submit & Reset buttons -->
<button type="reset">Reset</button>
<button type="submit">Submit</button>
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
<p>By Alex Jamshidi</p>
</footer>
</body>
</html>
Loading