Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
96 changes: 71 additions & 25 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,73 @@
<!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 name="viewport" content="width=device-width, initial-scale=1.0">
<title>T-Shirt Order Form</title>
<link rel="stylesheet" href="style.css">
</head>
<body>

<!-- 1. Header before Main -->
<header>
<h1>T-Shirt Order Form</h1>
</header>

<!-- 2. Main Content Container -->
<main>
<form>
<div>
<label for="name">Full Name:</label>
<input type="text" id="name" name="name" required>
</div>

<div>
<label for="email">Email Address:</label>
<input type="email" id="email" name="email" required>
</div>

<!-- T-shirt Colour (Radio buttons) -->
<fieldset>
<legend>T-shirt Colour:</legend>

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

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

<div>
<input type="radio" id="colour-black" name="colour" value="black">
<label for="colour-black">Black</label>
</div>
</fieldset>

<!-- T-shirt Size -->
<div>
<label for="size">T-shirt Size:</label>
<select id="size" name="size" required>
<option value="" disabled selected>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">Submit Order</button>
</form>
</main>

<!-- 3. Footer with Name and Closing Tag -->
<footer>
<p>Designed and built by Quentin Gwele</p>
</footer>

</body>
</html>
70 changes: 70 additions & 0 deletions Form-Controls/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
body {
font-family: Arial, sans-serif;
max-width: 500px;
margin: 30px auto;
padding: 20px;
background-color: #f9f9f9;
}

header {
text-align: center;
margin-bottom: 20px;
}

form {
background: #ffffff;
padding: 20px;
border-radius: 6px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

div {
margin-bottom: 15px;
}

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

fieldset {
border: 1px solid #ccc;
border-radius: 4px;
padding: 10px;
margin-bottom: 15px;
}

fieldset div {
display: inline-block;
margin-right: 15px;
margin-bottom: 0;
}

fieldset label {
display: inline;
font-weight: normal;
}

select, input[type="text"], input[type="email"] {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
}

button[type="submit"] {
background-color: #0066cc;
color: white;
padding: 10px 18px;
border: none;
border-radius: 4px;
cursor: pointer;
}

footer {
margin-top: 20px;
text-align: center;
font-size: 14px;
color: #666;
}
Loading