Problem:
- User Story #6: If I enter an email that is not formatted correctly, I will see an HTML5 validation error.
-
User Story #9: If I enter numbers outside the range of the number input, which are defined by the
min
andmax
attributes, I will see an HTML5 validation error.
Code So Far:
HTML
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<h1 id="title">Survey Form</h1>
<p id="description">Thank You For Participating In This Survey</p>
<form id="survey-form">
<div class="form-group">
<label id="name-label" foe="name">Name</label>
<input id="name"
name="name"
type="text"
placeholder="enter your name here"
required>
</div>
<form id="survey-form">
<div class="form-group">
<label id="email-label" for="email">Email</label>
<input id="email"
name="email"
type="text"
min="10"
max="99"
placeholder="enter your email here"
required>
</div>
<div class="form-group">
<label id="number-label" for="age">Age</label>
<input id="number"
name="age"
type="number"
placeholder="enter your age here"
>
</div>
<label for="food">Choose an option:</label>
<select id="dropdown" name="food">
<option value="macnchesse">MacnCheese</option>
<option value="pizza">pizza</option>
<option value="french-fries">french fries</option>
<option value="bacon">Bacon</option>
</select>
<label for="mayonnaise">
<input id="mayonnaise" value="mayonnaise" type="radio" name="Sauce">mayonnaise
</label>
<label for="ketchup">
<input id="ketchup" value="ketchup" type="radio" name="Sauce">ketchup
</label>
<label for="Pepperoni">
<input id="Pepperoni" value="Pepperoni" type="checkbox" name="Toppings">Pepperoni
</label>
<label for="Bacon">
<input id="Bacon" value="Bacon" type="checkbox" name="Toppings">Bacon
</label>
<label for="Extra-cheese">
<input id="Extra-cheese" value="Extra-cheese" type="checkbox" name="Toppings">Extra cheese
</label>
<br>
<textarea id="t" name="t" placeholder="your comments"></textarea>
<input id="submit" type="submit">
CSS
#title{
color: blue;
font: Arial;
font-size: 55px;
background-color: orange;
text-align:center;
}
body{
align-items: center;
background-color: yellow;
text-align:center;
}
#description{
background-color: yellow;
font-size: 20px;
text-align:center;
}
Please Help!