Skip to content
Open
Changes from 14 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
66 changes: 52 additions & 14 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,62 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My form exercise</title>
<header><h1>Product Pick</h1></header>

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.

This is inside <head>. Which part of the page does <head> describe, and where should something the user sees go? The starter file had this right.

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.

Fixed.

<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<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-->
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
</footer>
</body>
<label for="name">Customer Name</label>
<input type="text" id="name" name="name" pattern=".*\S.*\S.*" title="You must enter at least two characters" required />
<div>
<label for="email">Email</label>
<input type="email" id="email" name="email" required>
</div>

<div>

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.

This <div> is never closed. Count the opening and closing divs from here to line 51. That's why the validator stops and Prettier can't format the file.

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.

Fixed, and the validator is clean now.

<br>
Color

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.

Loose text as a heading for the radios. Hammad's fieldset link was about this. What does the MDN page from the prep on structuring a form use to group radio buttons and caption them?

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.

That's the one. Fieldset and legend, done.

<div>
<label for="red">Red</label>
<input type="radio" id="red" name="color" value="red" required>
</div>
<div>
<label for="blue">Blue</label>
<input type="radio" id="blue" name="color" value="blue" required>
</div>
<div>
<label for="green">Green</label>
<input type="radio" id="green" name="color" value="green" required>
</div>
<br>
<div>
<label for="size">Size</label>
<select name="size" id="size" required>
<option disabled hidden selected required value="">Select One</option>

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.

required isn't an attribute an <option> can have. The one on the <select> on line 42 is the one doing the work, so this can go.

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.

Fixed.

<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>
<p></p>

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.

Hammad asked about the empty <p> and there's still one here. What is it for?

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.

Gone, good.

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




<footer>
<p>By Fung Nin Lee (Roger) HOMEWORK SOLUTION</p>

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.

HOMEWORK SOLUTION should have gone when you put your name in.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hi Abdi. Thank you for your comments. Could you feel free to check if it is OK now?

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.

Yes, all the structure points are done. One thing left, formatting, see the main comment.

</footer>

</body>
</html>
Loading