Alright so this project I did on my own without relying on step by step instruction and although my code seems to be correct it still doesn’t pass many tests.
Here’s the code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Survey Form</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<h1 id="title">Survey Form by Z</h1>
<p id="description">Please answer the following questions.</p>
<form method="post" id="survey-form">
<label for="name-label">Enter your name:
<input id="name" type="text" placeholder="John Smith" value="Name" required />
</label>
<label for="email">Enter your E-mail:
<input id="email" type="email" value="Email" name="email" placeholder="johnsmith@gmail.com" required />
</label>
<label for="numericInput">What's your age?</label>
<input id="number" type="number" name="numericInput" min="1" max="100" value="numericInput" placeholder="18" />
<label for="dropdown">Select your gender:</label>
<select id="dropdown" name="dropdown">
<option value="option1">Male</option>
<option value="option2">Female</option>
<option value="option3">No you don't get to choose "other"</option>
</select>
<fieldset>
<legend>Where do you live?</legend>
<label for="location-india"><input id="location-india" type="radio" name="location" value="location" class="inline" />India</label>
<label for="location-saudi"><input id="location-saudi" type="radio" name="location" value="location" class="inline" />Saudi Arabia</label>
<label for="location-other"><input id="location-other" type="radio" name="location" class="inline" value="location" />Other</label>
</fieldset>
<label for="hobbies">What are your hobbies?</label>
<input id="hobbies" type="checkbox" name="hobbies" value="hobbies" class="inline" />Reading </label>
<input id="hobbies" type="checkbox" name="hobbies" value="hobbies" class="inline" />Cooking </label>
<input id="hobbies" type="checkbox" name="hobbies" value="hobbies" class="inline" />Baking</label>
<input id="hobbies" type="checkbox" name="hobbies" value="hobbies" class="inline" />Studying (ok nerd) </label>
<input id="hobbies" type="checkbox" name="hobbies" value="hobbies" class="inline" />Gardening </label>
<input id="hobbies" type="checkbox" name="hobbies" value="hobbies" class="inline" />Traveling</label>
<input id="hobbies" type="checkbox" name="hobbies" value="hobbies" class="inline" />Internet Surfing</label>
<input id="hobbies" type="checkbox" name="hobbies" value="hobbies" class="inline" />Painting/Drawing</label>
<input id="hobbies" type="checkbox" name="hobbies" value="hobbies" class="inline" />Work Out</label>
<input id="hobbies" type="checkbox" name="hobbies" value="hobbies" class="inline" />Walking</label>
<input id="hobbies" type="checkbox" name="hobbies" value="hobbies" class="inline" />Playing Sports</label>
<input id="hobbies" type="checkbox" name="hobbies" value="hobbies" class="inline" />Watching movies/series</label>
<label for="personal-comment">What's one thing you want to accomplish in 2024?
<textarea id="personal-comment" rows="3" cols="35" placeholder="I wish to travel overseas in 2024..."></textarea>
</label>
<input type="submit" id="submit" />
</form>
</body>
</html>
And here are the instructions it doesn’t pass no matter how many changes I make
-
You should have a
labelelement with anidofname-label. -
Failed:You should have a
labelelement with anidofemail-label. -
Failed:You should have a
labelelement with anidofnumber-label. -
Failed:Your
#name-labelshould contain text that describes the input. -
Failed:Your
#email-labelshould contain text that describes the input. -
Failed:Your
#number-labelshould contain text that describes the input. -
Failed:Your
#name-labelshould be a descendant of#survey-form. -
Failed:Your
#email-labelshould be a descendant of#survey-form. -
Failed:Your
#number-labelshould be a descendant of#survey-form.
can someone please tell me what’s wrong or what I can do to fix the issues?
