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
41 changes: 40 additions & 1 deletion Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,52 @@
<title>My form exercise</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
/* write your css here */
input:valid {
border: 2px solid green;
}
input:invalid {
border: 2px solid red;
}
</style>
</head>
<body>
<header>
<h1>Product Pick</h1>
</header>
<main>
<form>
<label for="product-name">Product Name:</label>
<input type="text" id="product-name" placeholder="Product Name" required pattern="^[a-zA-Z\s]+$" maxlength="20" minlength="2"/>
Comment on lines +25 to +26
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.

  • Do you mean "User name"?

  • Can you also fix this input field so that it will not accept any name containing only space characters?

<br>
<br>
<label for="email-add">Email Address:</label>
<input type="email" id="email-add" placeholder="Email Address" required />
<br>
<br>
<label >T shirt color:</label>
<select name="color" required>
<option value="">Select a color</option>
<option value="red">Red</option>
<option value="blue">Blue</option>
<option value="green">Green</option>
</select>
Comment on lines +33 to +39
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.

Code is not indented or formatted consistently.

Please consider following this guide to enable VS Code's
"Format on Save" option or to use its "Format Document" command to ensure your code is always consistently formatted.

<br>
<br>
<label>T shirt size: </label>
<select name="size" required>
<option value="">Select a size</option>
<option value="extra-small">XS</option>
<option value="small">S</option>
<option value="medium">M</option>
<option value="large">L</option>
<option value="extra-large">XL</option>
<option value="double-extra-large">XXL</option>
</select>
<br>
<br>
<input type="submit" value="Submit">
<!-- write your html here-->
<!--
try writing out the requirements first as comments
Expand All @@ -21,7 +60,7 @@ <h1>Product Pick</h1>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
<p>By Fahman ALQADASI</p>
</footer>
</body>
</html>
Loading