Skip to content
Open
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
37 changes: 30 additions & 7 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 @@ -13,15 +13,38 @@ <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: required, at least 2 non-space characters-->
<label for="Your-name">What is your name</label>
<input type="text" id="Your-name" pattern=".*\S.*\S.*" required />

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.

The radios have a name attribute, this input and the email and size don't. What does name do when a form is submitted? Submit the form and look at the address bar. Not a blocker.

<!-- Email: a valid email address-->
<label for="Email">Your email address</label>
<input type="email" id="Email" required />
<!-- Colour Any one from three options available-->
<fieldset>
<legend>Choose any one colour of your shirt</legend>
<input type="radio" name="colour" id="Red" value="Red" required />
<label for="Red">Red</label>
<input type="radio" name="colour" id="Green" value="Green" required />
<label for="Green">Green</label>
<input type="radio" name="colour" id="Blue" value="Blue" required />
<label for="Blue">Blue</label>
</fieldset>
<!-- Size 6 options: XS, S, M, L, XL, XXL-->
<label for="size">What size do you need?</label>
<select 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>
<button type="submit">Submit</button>
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
<p>By Alan Mak</p>
</footer>
</body>
</html>
Loading