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
66 changes: 62 additions & 4 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,75 @@
<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-->
<!-- try writing out the requirements first as comments, this will also help you fill in your PR message later-->
<section>
<fieldset>
<legend>
Customer information
</legend>
<div>
<label for="name">Name</label>
<input type="text" id="name" name="customer-name" placeholder="name" required>

Choose a reason for hiding this comment

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

Might want to consider have the placeholder name be 'Name' (uppercase) since the placeholder for email uses uppercase.

</div>

<div>
<label for="email">Email</label>
<input type="email" id="email" name="customer-email" placeholder="Email" required>
</div>
</fieldset>
</section>
<section>
<h2>T-shirt Color</h2>
<div>
<label for="color">Color</label>
<select name="color" id="color" required>
<option disabled>Color</option>

Choose a reason for hiding this comment

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

Can you find a way to make a placeholder text appear in the dropdown (i.e. "Color") instead of "White"?

<option value="White">White</option>
<option value="Black">Black</option>
<option value="Green">Green</option>
</select>
</div>

<h2>T-shirt Size</h2>

Choose a reason for hiding this comment

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

Can you find a way to style the radio buttons so they are not misaligned?

Here is an example of well-aligned vertical radio buttons:
Image

<div>
<label for="xs">XS</label>
<input type="radio" name="size" id="xs" value="Extra small" required>
</div>
<div>
<label for="s">S</label>
<input type="radio" name="size" id="s" value="Small" required>
</div>
<div>
<label for="m">M</label>
<input type="radio" name="size" id="m" value="Medium" required>
</div>
<div>
<label for="l">L</label>
<input type="radio" name="size" id="l" value="Large" required>
</div>
<div>
<label for="xl">XL</label>
<input type="radio" name="size" id="xl" value="Extra large" required>
</div>
<div>
<label for="xxl">XXL</label>
<input type="radio" name="size" id="xxl" value="XX Large" required>
</div>
</section>

<button>Submit</button>
</form>
</main>

<hr>

<footer>
<!-- change to your name-->
<h2>By HOMEWORK SOLUTION</h2>
<h5>By Fida H Ali Zada</h5>

Choose a reason for hiding this comment

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

You might want to consider using a different HTML element for your name within the footer. Right now, having <h5> in the footer will signal to screen readers that there is something new and important in the footer. In a sense, it breaks the semantic order of the page.

</footer>
</body>
</html>