Skip to content
Open
60 changes: 58 additions & 2 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand All @@ -17,11 +17,67 @@ <h1>Product Pick</h1>
<!--
try writing out the requirements first as comments
this will also help you fill in your PR message later-->

<!-- TODO1: Customer name -->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good to write out your TODOs in comments as you're going along, but anything that is used as a tool for development can be removed once that development is done! Same applies to the other comments too 🙂

<div>
<label for="name">Full Name:</label>
<input
type="text"
name="name"
id="name"
placeholder="Enter Your Name"
required
pattern=".*\S.*\S.*"
/>
<br><br>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see you've used br a lot here to create space between the different form elements. This is a neat trick, but is actually not what it is supposed to be used for. To quote MDN:

The <br> element has a single, well-defined purpose — to create a line break in a block of text.

If you are adding spacing between elements on a page, that's exactly what CSS is for. Shortcuts like this can seem useful but they run the risk of causing unexpected confusion for assistive technologies when used out of place!

Note: styling is not required for this task. I'm not going to require you to change anything on this point, but bear in mind for future that you should avoid using br tags for this reason 🙂

</div>

<!-- TODO2: Customer email -->
<div>
<label for="email">Enter Your Email:</label>
<input
type="email"
id="email"
name="email"
placeholder="Email"
required
/>
<br><br>
</div>

<!-- TODO3: Colors to choose from -->
<div>
<label for="color">Color</label>
<select name="color" id="color" required>
<option value="">Please choose a color</option>
<option value="navy">Navy</option>
<option value="sage green">Sage Green</option>
<option value="charcoal">Charcoal</option>
Comment on lines +53 to +55

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love the creative choices of colours! 😄

</select>
<br><br>
</div>

<!-- TODO4: Sizes to choose from -->
<div>
<label for="size">Choose a Size</label>
<select name="size" id="size" required>
<option value="">Select a 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>
<br><br>
</div>

<button type="submit">Submit</button>
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
<p>By RAHANA SULEIMAN</p>
</footer>
</body>
</html>
Loading