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
93 changes: 69 additions & 24 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,72 @@
<!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>
<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" />
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good job that you separated the CSS into its own file—that’s an excellent best practice and will make your code much easier to read, debug, and maintain as it grows.

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.

Thank you

</head>
<body>
<header>
<h1>Product Pick</h1>
</header>
<main>
<form>
<fieldset>
<legend>Name and Email address</legend>
<!--Adding <legend> element for accessibility purposes-->
<label for="name">Name</label>
<input type="text" id="name" name="name" minlength="2" pattern="(?:.*\S){2,}.*" required><br><br>
<!--Input field for name, making it required-->
<label for="email">Email:</label>
<input type="email" id="email" required><br><!--Input field for email address. Making it required-->
</fieldset>


<fieldset>
<legend>Please select a colour for your T-Shirt</legend>
<label>
<input type="radio" name="colour" required>Blue
</label>
<label>
<input type="radio" name="colour">Red
</label>
<label>
<input type="radio" name="colour">Green
</label><!--Making radio buttons for Blue, Red and Green and making the require fields-->
</fieldset><br>
<fieldset>
<legend>Please select a size for your T-Shirt</legend>
<label>
<!--Making radio buttons for XS, S, M, L, XL and XXL sizes, and making them required fields-->
<input type="radio" name="size" required>XS
</label>
<label>
<input type="radio" name="size" >S
</label>
<label>
<input type="radio" name="size">M
</label>
<label>
<input type="radio" name="size">L
</label>
<label>
<input type="radio" name="size">XL
</label>
<label>
<input type="radio" name="size">XXL
</label>
</fieldset><br>
<div>
<button>Submit</button><!--adding final comment to test push and PR-->
</div>
</form>
</main>
<footer>
<p>By Vito Moratti</p>
</footer>
</body>

</html>
3 changes: 3 additions & 0 deletions Form-Controls/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
legend {
font-weight: bold;
}
Loading