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
88 changes: 64 additions & 24 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,67 @@
<!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-->
<p>By HOMEWORK SOLUTION</p>
</footer>
</body>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>T-Shirt Order Form</title>
</head>
<main>
<body>
<h1>Order Your T-Shirt</h1>

<form>
<!-- 1. Customer Name -->
<div>
<label for="name">Full Name:</label>
<input
type="text"
id="name"
name="name"
pattern=".*\S.*\S.*"
required
>
</div>

<!-- 2. Customer Email -->
<div>
<label for="email">Email Address:</label>
<input
type="email"
id="email"
name="email"
required
>
</div>

<!-- 3. T-shirt Color -->
<div>
<label for="color">T-Shirt Color:</label>
<select id="color" name="color" required>
<option value="">-- Please select a color --</option>
<option value="red">Red</option>
<option value="blue">Blue</option>
<option value="green">Green</option>
</select>
</div>

<!-- 4. T-shirt Size -->
<div>
<label for="size">T-Shirt Size:</label>
<select id="size" name="size" required>
<option value="">-- Please 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>
<footer>
<!-- Submit Button -->
<button type="submit">Place Order</button>
</form>
</main>
</footer>
</body>
Comment on lines +60 to 66

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Indentation is off.

Suggestion:

  • Look up the benefits of using a code formatter.
  • Install the Prettier extension for VS Code, then:
    • Use VS Code's Format Document feature to format your code.
    • Optionally, enable Format On Save and Format On Paste to keep your code consistently formatted.

Resource: Visual Studio Code - Formatting

Note: The formatter may not work correctly if your code contains syntax errors.

</html>
Loading