Skip to content
Open
Show file tree
Hide file tree
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
58 changes: 50 additions & 8 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My form exercise</title>
<link rel="stylesheet" href="style.css" />
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
Expand All @@ -12,16 +13,57 @@
<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 method="get">
<div>
<label for="CustomerName">Customer Name:</label>
<input
type="text"
id="CustomerName"
name="CustomerName"
required
pattern=".*\S.*\S.*"
title="Enter at least two non-space characters"
/>
</div>
<div>
<label for="CustomerEmail">Customer Email:</label>
<input
type="email"
id="CustomerEmail"
name="CustomerEmail"
required
pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}"
title="Enter an email address such as name@example.com"
/>
</div>
<div>
<label for="T-ShirtsColor">T-Shirt Color:</label>
<select id="T-ShirtsColor" name="T-ShirtsColor" required>
<option value="" selected disabled>Choose a color</option>
<option value="Red">Red</option>
<option value="Blue">Blue</option>
<option value="Green">Green</option>
</select>
</div>
<div>
<label for="T-ShirtsSize">T-Shirt Size:</label>
<select id="T-ShirtsSize" name="T-ShirtsSize" required>
<option value="" selected disabled>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>
</div>
<div>
<button type="submit">Place Order</button>
</div>
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
<p>By Carol Nassuna</p>
</footer>
</body>
</html>
21 changes: 21 additions & 0 deletions Form-Controls/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
form > div {
margin-bottom: 1em;
}

label {
font-weight: bold;
}

button {
background-color: #4caf50;
color: black;
font-weight: bold;
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
}

button:hover {
background-color: #45a049;
}
Loading