Tell us what’s happening:
Describe your issue in detail here.
I have errors in the survey form I’ve developed. I’ve listed them below:
- Your
#dropdown
should be a descendant of#survey-form
. - You should have at least two radio buttons that are descendants of
#survey-form
. - You should have at least two
input
elements with atype
ofcheckbox
(checkboxes) that are descendants of#survey-form
. - All your checkboxes inside
#survey-form
should have avalue
attribute and value. - You should have at least one
textarea
element that is a descendant of#survey-form
. - Your
#submit
should be a descendant of#survey-form
.
Your code so far
<!Doctype html>
<html>
<meta charset="utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="styles.css">
<h1 id="title">Improve your eating habits</h1>
<p id="description"
class="description text-center">Thank you for your time</p>
<fieldset>
<form id="survey-form">
<div class="input-element">
<label id="name-label">Name:
<input id="name"
type="text"
placeholder="Enter your name"
required />
</label>
</div>
<div class="input-element">
<label id="email-label">Email:
<input id="email"
type="email"
placeholder="Enter your email"
required />
</label>
</div>
<div class="input-element">
<label id="number-label">Enter your age (years):
<input id="number"
type="number"
placeholder="age"
required
min="10"
max="100"/>
</label>
</div>
</fieldset>
<fieldset>
<label>What is your favourite fruit:</label>
<select id="dropdown">
<option value="0">Select a fruit</option>
<option value="1">Apple</option>
<optiom value="2">Banana</option>
<option value="3">Mango</option>
</select>
</fieldset>
</form>
<div>
<label>Do you eat vegetables?</label>
</div>
<div>
<label>Yes<input type="radio" value="Yes"
name="vegetables"/></label>
<label>No<input
type="radio" value="No"
name="vegetables"/></label>
</div>
<div>
<label>Pick your favourite vegies:<label>
</div>
<div>
<fieldset>
<label>Butternut<input
type="checkbox"
name="butternut"
value="butternut"></label>
<label>Sweet potatoe<input
type="checkbox"
name="butternut"
value="butternut"></label>
<label>Carrot<input
type="checkbox"
name="carrot"
value="carrot"></label>
<label>Squash<input
type="checkbox"
name="squash"
value="squash"></label>
<label>Cabbage<input
type="checkbox"
name="cabbage"
value="cabbage"></label>
<label>Tomatoe<input
type="checkbox"
name="tomatoe"
value="tomatoe"></label>
</fieldset>
</div>
<label>Comment your thoughts below:</label>
<textarea>Enter your thoughts here...</textarea>
<div class="form-group">
<button type="submit" id="submit" class="submit-button">
Submit
</button>
</div>
</html>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Challenge: Survey Form - Build a Survey Form
Link to the challenge: