Skip to content
101 changes: 77 additions & 24 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,80 @@
<!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>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Form Controls Project</title>
</head>
<body>
<main>
<h1>Registration Form</h1>
<form>
<!-- Name -->
<label for="name">Full Name:</label>
<input type="text" id="name" name="name" required minlength="2" placeholder="Enter your full name">

<!-- Email -->
<label for="email">Email:</label>
<input type="email" id="email" name="email" required placeholder="example@email.com">

<!-- Password -->
<label for="password">Password:</label>
<input type="password" id="password" name="password" required minlength="6" placeholder="Min 6 characters">

Copy link
Contributor

Choose a reason for hiding this comment

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

Does the spec ask for password input?

Can you remove all input elements that are not specified in the spec (README.md) from this form?

<!-- Age -->
<label for="age">Age:</label>
<input type="number" id="age" name="age" min="18" max="100" required>

<!-- Gender -->
<label for="gender">Gender:</label>
<select id="gender" name="gender" required>
<option value="">--Choose one--</option>
<option value="female">Female</option>
<option value="male">Male</option>
<option value="other">Other</option>
</select>

<!-- Radio buttons -->
<fieldset>
<legend>Preferred Contact Method:</legend>
<label><input type="radio" name="contact" value="email" required>Email</label>
<label><input type="radio" name="contact" value="phone">Phone</label>
<label><input type="radio" name="contact" value="post">Post</label>
</fieldset>

<!-- Color selection -->
<fieldset>
<legend>Choose a Colour:</legend>
<label><input type="radio" name="colour" value="red" required>Red</label>
<label><input type="radio" name="colour" value="green">Green</label>
<label><input type="radio" name="colour" value="blue">Blue</label>
</fieldset>

<!-- Size selection -->
<label for="size">Choose a Size:</label>
<select id="size" name="size" required>
<option value="">--Select 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>

<!-- Checkbox -->
<label class="checkbox">
<input type="checkbox" name="agree" required>
I agree to the Terms & Conditions
</label>

<!-- Submit -->
<button type="submit">Submit</button>
</form>
</main>

<footer>
<p>Form Controls Project – Onboarding Module</p>
</footer>
Comment on lines 81 to 83
Copy link
Contributor

Choose a reason for hiding this comment

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

The original HTML code has a comment that specifies what the footer content should be. Can you update the footer content to meet that requirement?

</body>
</html>
Loading