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
138 changes: 113 additions & 25 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,115 @@
<!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>
</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 where customers choose their size and colour." />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
body {
font-family: Arial, sans-serif;
background-color: white;
margin: 0;
padding: 40px;

}

.form-group {
margin-bottom: 20px;
}

h1 {
text-align: center;
margin-bottom: 25px;
}

.container {
max-width: 500px;
margin: auto;
background: #ffffff;
padding: 30px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

label {
display: block;
margin-bottom: 8px;
font-weight: bold;
}

input,
select,
button {
width: 100%;
padding: 10px;
font-size: 16px;
border: 1px solid #cccccc;
border-radius: 5px;
box-sizing: border-box;
}

button {
background-color: #000000;
color: white;
border: none;
cursor: pointer;
}

button:hover {
opacity: 0.9;
}
</style>
</head>

<body>
<header>
<h1>Product Pick</h1>
</header>
<main class="container">
<form>

<div class="form-group">
<label for="name">Name</label>
<input type="text" name="name" id="name" required minlength="2" pattern=".*\S.*\S.*"
placeholder="Enter your full name">
</div>

<div class="form-group">
<label for="email">Email</label>
<input type="email" name="email" id="email" required placeholder="Enter your email">
</div>
<div class="form-group">
<label for="colour">T-Shirt Colour</label>
<select id="colour" name="colour" required>
<option value="">Select a colour</option>
<option value="black">Black</option>
<option value="white">White</option>
<option value="red">Red</option>
</select>
</div>
<div class="form-group">
<label for="size">T-Shirt Size</label>
<select id="size" name="size" required>
<option value="">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>

<button type="submit">Place Order</button>
</form>
</main>
<footer>
<!-- change to your name-->
<p>By Liyema Mfengwana</p>
</footer>
</body>

</html>
Loading