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
45 changes: 37 additions & 8 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,45 @@
<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>
<form>
Copy link

Choose a reason for hiding this comment

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

Could grouping related inputs using fieldset and legend improve organisation or accessibility here?

<label for="name">What is your name?</label>
<br><br>
Copy link

Choose a reason for hiding this comment

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

Do you need the
elements for spacing here, or might there be another way to control layout?

<input type="text" id="name" name="name" required minlength="2" pattern="[A-Za-z]+([A-Za-z\s]*[A-Za-z]+)*">
Copy link

Choose a reason for hiding this comment

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

What effect does the name pattern restriction have, could it exclude valid real world names?

<br><br>
<label for="email">What is your email?</label>
<br><br>
<input type="email" id="email" name="email" required>
<br><br>

<label for="colour">Pick a colour</label>
<select id="colour" name="colour" required>
<option value="" disabled selected>Pick a colour</option>
<option value="red">Red</option>
<option value="blue">Blue</option>
<option value="green">Green</option>
</select>

<br><br>

<label for="size">What is your size?</label>
<select id="size" name="size" required>
<option value="" disabled selected>What is your 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>

<input type="submit" value="Submit">
</form>
</main>
Copy link

Choose a reason for hiding this comment

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

Are there any structural elements you could simplify or make more semantic?

<footer>
<!-- change to your name-->
<h2>By HOMEWORK SOLUTION</h2>
<h2>By Xuanming Hu</h2>
</footer>
</body>
</html>
Loading