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
60 changes: 52 additions & 8 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,71 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<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" />
<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-->
<label for="user-name">Your Name:</label>
<input id="user-name" type="text" pattern="[A-Za-z\s\-]{2,}" title="Please enter at least 2 letters. Numbers and symbols are not allowed" required>


<br>

<label for="email">Your Email:</label>
<input id="email" name="user_email" type="email" required>
<button id="go" type="submit"> GoWeiTsungCheng19 hours ago
You should put your name here

WeiTsungCheng19 hours ago
This is incorrectly expressed.

Besides some duplicate values, the value of size should not be color.

WeiTsungCheng19 hours ago
It's best to include a name in the input field. Or the form won't include the data when you submit it
</button>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Although the Button has a default type, it is still recommended to specify it explicitly.

<br>

<label for="colors">Choose your favorite color:</label>
<select id="colors" name="colour" required>
<option value="" disabled selected>Select a color...</option>
<option value="red">Red</option>
<option value="blue">Blue</option>
<option value="green">Green</option>
</select>

<br>

<label for="shirtsize">What size do you want?</label>

<select id="shirtsize" name="size" required>
<option value="" disabled selected>Select a size...</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>
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
</footer>
</body>
</html>
<footer>
<!-- change to your name-->
<p>Chan Yat Long</p>
</footer>
</body>
</html>