Skip to content
Open
90 changes: 65 additions & 25 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,67 @@
<!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="" />
<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>
<div>
<label for="full-name">Name</label>
<input type="text" id="full-name" name="full-name" required minlength="2" pattern=".*\S.*\S.*"
title="Please enter at least two nonspace characters">
</div>
<div>
<label for="email">Email</label>
<input type="email" id="email" name="email" required>
</div>
<div class="tshirt-colour">
<legend>T-shirt Colour</legend>
<div>
<label>
<input type="radio" name="colour" value="red" required> red
</label>
</div>
<div>
<label>
<input type="radio" name="colour" value="green" required> green
</label>
</div>
<div>
<label>
<input type="radio" name="colour" value="blue" required> blue
</label>
</div>
</div>
<div>
<label for="size">T-shirt Size</label>
<select id="size" name="size" required>
<option value="">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>
</div>
<button type="submit">Confirm Order</button>

</form>
</main>
<footer>
<p>Carolina Maday Villa Huanca</p>
</footer>
</body>

</html>
Comment on lines +65 to +67
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the code is manually indented.

You may want to follow this guide and
enable "Format on Save" in VS Code or use VS Code's "Format Document" feature to keep your code consistently formatted. It could save you some time.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, thank you. I've done this now but I can't see any changes.

27 changes: 27 additions & 0 deletions Form-Controls/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
body {
background-color: #FFFFE0;
font-family: Arial, sans-serif;
display: block;
margin: 50px 0 0 50px;
padding: 10px 20px 10px 20px;
}
div{
margin-bottom: 20px;

}
.tshirt-colour{
margin-bottom: 15px;
display: centred;
align-items: center;
}
input[type="radio"] {
margin-right: 10px;
width: 20px;
height: 20px;
cursor: pointer;
}
label{
padding: 10px 0;
display: inline-block;
cursor: pointer;
}
Loading