Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
50 changes: 39 additions & 11 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,48 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<header>
<h1>Product Pick</h1>
</header>
<header><h1>Order Your T-Shirt</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-->
<fieldset>
<legend>Your Details</legend>
<div class="form-group">
<label for="name">Full name:</label><br />
<input id="name" name="name" type="text" minlength="2" required aria-describedby="name-help" />
<small id="name-help">Name must be at least two characters.</small>
</div>

<div class="form-group">
<label for="email">Email address:</label><br />
<input id="email" name="email" type="email" required aria-describedby="email-help" />
<small id="email-help">Enter a valid email, e.g. name@example.com.</small>
</div>
</fieldset>

<fieldset>
<legend>Choose your T-Shirt colour</legend>
<label><input type="radio" name="color" value="red" required /> Red</label>
<label><input type="radio" name="color" value="blue" required /> Blue</label>
<label><input type="radio" name="color" value="black" required /> Black</label>
</fieldset>

<fieldset>
<legend>Select your size</legend>
<label for="size">Size:</label>
<select id="size" name="size" required>
<option value="">-- Select your 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>
</fieldset>

<button type="submit">Submit</button>
</form>
</main>
<footer>
<!-- change to your name-->
<h2>By HOMEWORK SOLUTION</h2>
</footer>
<footer>By Fatimatou Bah</footer>
</body>
</html>