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
87 changes: 61 additions & 26 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,62 @@
<!DOCTYPE html>
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 w3c validator is showing an error. How can you fix it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Add the code to fix the error

<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-->
<p>By HOMEWORK SOLUTION</p>
</footer>
</body>
</html>
<html lang="en" title="Checking Form">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Checking Form</title>
</head>

<body>
<main>
<form class="customer-form" title="checking">

<H1>Checking Form:</H1>

<div>
<label for="customer-name">Customer's name : </label>
<input id="customer-name" name="customer-name" type="text" required pattern=".*\S.*\S.*"
title="Please enter at least two non-space characters." />
</div>
<br>

<div>
<label for="customer-email">Customer's email : </label>
<input id="customer-email" name="customer-email" type="email" required />

</div>
<br>

<div>
<label for="tshirt-colour">T-shirt Color : </label>
<select id="tshirt-colour" name="tshirt-colour" required>
<option value="" disabled selected>Select a colour</option>
<option value="red">Red</option>
<option value="blue">Blue</option>
<option value="black">Black</option>
</select>
</div>
<br>
<div>
<label for="tshirt-size">T-shirt size required : </label>
<select id="tshirt-size" name="tshirt-size" required>
<option value="" disabled selected>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>
<br>
<button type="submit">Submit checking</button>
</form>
</main>
<footer>
<p>By ChunyanWong HOMEWORK SOLUTION</p>
</footer>
</body>

</html>
Loading