Skip to content
118 changes: 91 additions & 27 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,91 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My form exercise</title>
<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-->
<h2>By HOMEWORK SOLUTION</h2>
</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>My form exercise</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>

<body>
<header>
<h1>Product Pick</h1>
</header>

<main>
<form>

<!-- Name input -->
<div>
<label for="name">Name</label><br>
<input type="text" id="name" name="user_name"
placeholder="John Smith"
required minlength="2">
</div>
<br>

<!-- Email input -->
<div>
<label for="email">Email</label><br>
<input type="email" id="email" name="user_email"
placeholder="johnsmith@hotmail.com"
required minlength="5">
</div>
<br>

<!-- Colour selection -->
<fieldset>
<legend>Colour</legend>

<div>
<label>
<input type="radio" name="colour" value="red" required>
Red
</label>
</div>
<div>
<label>
<input type="radio" name="colour" value="blue">
Blue
</label>
</div>
<div>
<label>
<input type="radio" name="colour" value="green">
Green
</label>
</div>
</fieldset>
<br>

<!-- Size selection -->
<fieldset>
<legend>Select Size</legend>

<div>
<select id="size" name="size" required>
<option value="" selected disabled>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>
</div>
</fieldset>
<br>

<!-- Submit button -->
<div>
<button type="submit">Submit</button>
</div>

</form>
</main>

<footer>
<p>By LIBAN JAMA</p>
</footer>
Comment on lines 86 to 88
Copy link
Contributor

Choose a reason for hiding this comment

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

Headings (<h1><h6>) are meant to label sections of content.

Use of <h2> would make "By LIBAN JAMA" sounds like a header of a major section to a screen reader and to search engines. <p> is probably more appropriate here.


</body>
</html>