Skip to content

London | May-2025 | Samuel Tarawally | Form Controls #689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
98 changes: 73 additions & 25 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,75 @@
<!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>

<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My form exercise</title>
<meta name="description" content="T-Shirt Order Form" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>

<body>
<header>
<h1>Product Pick</h1>
</header>
<main>
<form>
<!-- Customer Name Input -->
<p>
<label for="customerName">Name:</label>
<input type="text" id="customerName" name="customerName" required minlength="2"
placeholder="Enter your full name">
</p>

<!-- Customer Email Input -->
<p>
<label for="emailAddress">Email:</label>
<input type="email" id="emailAddress" name="emailAddress" required placeholder="[email protected]"
pattern="^[a-zA-Z0-9._%+-]+@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+([a-zA-Z]{2,63})$"
title="Please enter a valid email address (e.g., [email protected]). Domain parts (like 'example') must start and end with a letter or number, can contain hyphens, and must be separated by dots. Ends with a top-level domain (e.g., .com).">
</p>

<!-- T-Shirt Colour Selection -->
<fieldset>
<legend>Choose T-Shirt Colour:</legend>
<p>
<input type="radio" id="colourRed" name="shirtColour" value="red" required>
<label for="colourRed">Red</label>
</p>
<p>
<input type="radio" id="colourBlue" name="shirtColour" value="blue">
<label for="colourBlue">Blue</label>
</p>
<p>
<input type="radio" id="colourGreen" name="shirtColour" value="green">
<label for="colourGreen">Green</label>
</p>
</fieldset>

<!-- T-Shirt Size Selection -->
<p>
<label for="shirtSize">Choose Size:</label>
<select id="shirtSize" name="shirtSize" required>
<option value="">-- Please choose 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>
</p>

<!-- Submit Section Button -->
<p>
<button type="submit">Place Order</button>
</p>
</form>
</main>
<footer>
<h2>By Samuel Tarawally</h2>
</footer>
</body>

</html>