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
53 changes: 48 additions & 5 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand All @@ -13,15 +13,58 @@ <h1>Product Pick</h1>
</header>
<main>
<form>
<!-- write your html here-->
<!--
try writing out the requirements first as comments
<div>
<label for="name"> Name:</label>
<input
type="text"
id="name"
name="name"
required
pattern="\S{2,}"
title="Please enter at least two non-space characters."
/>
</div>

<div>
<label for="email"> Email:</label>
<input type="email" id="email" name="email" required />
</div>
<div>
<label for="color"> Colour:</label>
<select id="color" name="color" required>
<option value="">Please select a colour</option>
<option value="red">Red</option>
<option value="blue">Blue</option>
<option value="green">Green</option>
</select>
</div>
<div>
<label for="size"> 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>
<div>
<button type="submit">Submit</button>
</div>
<!--
this will also help you fill in your PR message later-->
<!--
What is the customer's name? I must collect this data and ensure it contains at least two non-space characters.
What is the customer's email? I must make sure the email is valid. Email addresses follow a consistent pattern.
What colour should this T-shirt be? I must provide 3 options. How will I ensure they do not choose other colours?
What size does the customer want? I must provide the following 6 options: XS, S, M, L, XL, XXL -->
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
<p>By Russom G</p>
</footer>
</body>
</html>
38 changes: 38 additions & 0 deletions Form-Controls/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
header {
color: black;
padding: 1rem;
text-align: center;
margin-bottom: 20px;
}
main {
padding: 1rem;
}
form {
max-width: 400px;
margin: 0 auto;
}
div {
margin-bottom: 1rem;
}
label {
display: block;
margin-bottom: 0.5rem;
}
input,
select {
width: 100%;
padding: 0.5rem;
box-sizing: border-box;
}
button {
padding: 0.5rem 1rem;
background-color: #333;
color: white;
border: none;
cursor: pointer;
}
Loading