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
121 changes: 96 additions & 25 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,98 @@
<!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="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>

<body>
<header>
<h1>Product Pick</h1>
</header>
<main>
<form>
<!-- Requirements:
- Collect customer name (minimum 2 characters)
- Collect customer email (must be valid email)
- Choose 1 colour from 3 options
- Choose 1 size from 6 options (XS, S, M, L, XL, XXL)
- All fields are required
- HTML only, no CSS or JavaScript
- No form action
-->
<p>
<label for="customer-name">Name</label><br />
<input type="text" id="customer-name" name="customerName" required minlength="2" />
</p>
<p>
<label for="customer-email">Email</label><br />
<input type="email" id="customer-email" name="customerEmail" required />
</p>
<fieldset>
<legend>Choose a colour</legend>

<p>
<input type="radio" id="colour-red" name="tshirtColour" value="red" required />
<label for="colour-red">Red</label>
</p>

<p>
<input type="radio" id="colour-blue" name="tshirtColour" value="blue" />
<label for="colour-blue">Blue</label>
</p>

<p>
<input type="radio" id="colour-green" name="tshirtColour" value="green" />
<label for="colour-green">Green</label>
</p>
</fieldset>
<fieldset>

<legend>Choose a size</legend>

<p>
<input type="radio" id="size-xs" name="tshirtSize" value="XS" required />
<label for="size-xs">XS</label>
</p>

<p>
<input type="radio" id="size-s" name="tshirtSize" value="S" />
<label for="size-s">S</label>
</p>

<p>
<input type="radio" id="size-m" name="tshirtSize" value="M" />
<label for="size-m">M</label>
</p>

<p>
<input type="radio" id="size-l" name="tshirtSize" value="L" />
<label for="size-l">L</label>
</p>

<p>
<input type="radio" id="size-xl" name="tshirtSize" value="XL" />
<label for="size-xl">XL</label>
</p>

<p>
<input type="radio" id="size-xxl" name="tshirtSize" value="XXL" />
<label for="size-xxl">XXL</label>
</p>
</fieldset>
<p>
<button type="submit">Submit order</button>
</p>
</form>
</main>
<footer>
<!-- change to your name-->
<h2>By Laura</h2>
</footer>
</body>

</html>
Loading