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
63 changes: 56 additions & 7 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,76 @@
<!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>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="style.css" />
</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-->
<fieldset>
<legend>Customer Information</legend>
<p>
<label for="customerName">Customer Name</label>
<input
id="customerName"
name="customerName"
type="text"
pattern=".*\S.*\S.*"
placeholder="username"
required
/>
</p>
<p>
<label for="emailAddress">Email Address</label>
<input
id="emailAddress"
name="emailAddress"
type="email"
placeholder="email"
required
/>
</p>
</fieldset>
<fieldset>
<legend>T-shirt Colour and Size</legend>
<p>
<input type="radio" id="red" name="colour" value="red" required />
<label for="red">Red</label>
</p>
<p>
<input type="radio" id="green" name="colour" value="green" />

<label for="green">Green</label>
</p>
<p>
<input type="radio" id="blue" name="colour" value="blue" />
<label for="blue">Blue</label>
</p>
<p>
<label for="size">T-shirt Size</label>
<select id="size" name="size" required>
<option value="" disabled selected>Select 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>
</p>
</fieldset>
<input type="submit" value="Submit" />
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
<p>By AKLILU MIHTSUN</p>
</footer>
</body>
</html>
79 changes: 79 additions & 0 deletions Form-Controls/style.css
Comment thread
AkliluMihtsun marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
margin: 0;
}

header {
background-color: #333;
color: white;
text-align: center;
padding: 20px;
}

header h1 {
margin: 0;
}

main {
max-width: 600px;
margin: 30px auto;
padding: 0 20px;
}

fieldset {
background-color: white;
border: 1px solid #ccc;
border-radius: 8px;
padding: 20px;
margin-bottom: 20px;
}

legend {
font-weight: bold;
padding: 0 20px;
}

fieldset p {
margin-bottom: 15px;
}

input[type="text"],
input[type="email"] {
display: block;
width: 100%;
box-sizing: border-box;
padding: 10px;
margin-top: 6px;
border: 1px solid #bbb;
border-radius: 5px;
}

select {
display: block;
margin-top: 6px;
padding: 10px;
border: 1px solid #bbb;
border-radius: 5px;
}

input[type="submit"] {
background-color: #bbb;
color: black;
font-weight: bold;
padding: 10px 20px;
border-radius: 5px;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="radio"]:focus,
input[type="submit"]:focus,
select:focus {
outline: 3px solid black;
}

footer {
font-weight: bold;
padding: 10px 20px;
margin-top: 6px;
}
Loading