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
59 changes: 46 additions & 13 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,53 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<header>
<h1>Product Pick</h1>
<fieldset>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please review the fieldset tags, think about the correct placement when building a form, more on this in the link below. Thanks

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/fieldset

<legend>Product Pick</legend>
</header>

@hey-hammad hey-hammad Sep 11, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you please review the header tag, there is no opening <header> tag.

<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.*">
<div>
<label for="email">Email</label>
<input type="email" id="email" name="email">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The task says all fields are required. How will the form prevent submission if the user leaves the name, email, colour, or size blank?

</div>
<p></p>

@hey-hammad hey-hammad Sep 11, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

is there a reason for adding empty <p> tag here?

<div>
Color
<div>
<label for="red">Red</label>
<input type="radio" id="red" name="color" value="red">
</div>
<div>
<label for="blue">Blue</label>
<input type="radio" id="blue" name="color" value="blue">
</div>
<div>
<label for="green">Green</label>
<input type="radio" id="green" name="color" value="green">
</div>

<div>
<label for="size">Size</label>
<select name="size" id="size">
<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>
</form>
</main>
</fieldset>

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The submit button currently doesn't do anything, will moving to another place fix this?


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

</body>
</html>
Loading