I’m stuck at a test result saying (Your #dropdown should have at least two selectable (not disabled) option elements.). I used the label for element rather than the option one and got the same result. I don’t disable the options and can’t understand why they may be disabled. Please help. Thanks.
Your code so far
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Survey Form</title>
</head>
<body>
<h1 id="title">Survey Form</h1>
<p id="description">This is a form for you to express your opinion</p>
<form id="survey-form"/>
<input required id="name" type="text" placeholder="Ex: Ha Ab Hin"/>
<label for="name" id="name-label">Your Full Name</label>
<input required id="email" type="email" placeholder="Ex: hah@email.com"/>
<label for="email" id="email-label">Your email Address</label>
<input id="number" type="number" min="10" max="100" placeholder="Ex: 60"/>
<label for="number" id="number-label">The number shouldn't be less than 10 or more than 100</label>
<select id="dropdown">
<input type="radio" value="yes" name="option"/>
<option value="yes">Yes</option>
<input type="radio" value="no" name="option"/>
<option value="no">No</option>
</select>
<select>
<input type="checkbox" value="yes"/>
<label for="yes">Yes</label>
<input type="checkbox" value="yes" value="no"/>
<label for="no">No
</lebel>
<input type="checkbox" value="don't know"/>
<label for="don't know">Don't Know
</label>
<textarea id="comments" name="comments">Comments</textarea>
<button id="submit">Submit
</button>
</select>
</form>
</body>
</html>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0
I’m stuck at step 13. I changed many times based on my srearch results but have always got the result saying:
Your #dropdown should have at least two selectable (not disabled) option elements.
In the preview my options are selectable. Thus, I don’t know where the mistake is. Please help. My latest code is:
I posted before about the step 12 that is related to the radio button elements. I got a reply that there was not closing tag for the input. Here I tried to put a closing tag but the test result didn’t change saying that I should have at least two selectable (not disabled) options. May I know where my mistake this time is?
Much thanks in advance.
Thank you. Using the recommended HTML validator I could correct some mistakes. Yet, there is still something I can’t understand. The code became as follows:
…
What I don’t understand is the told errors which are related to the select element. The errors read:
1- Input start tag with select open.
2- Stray end tag select.
May I know how the select start tag is open and how its end tag is stray? Did I get a correct meaning of the told errors?
Many thanks in advance.
Note: When I posted the code after change didn’t appear. Thus, my reply may not be clear. However, the start and end tags of the select element remained as they were.
When I built my first survey form, I realized how important structure and accessibility are. Using semantic HTML for labels and inputs makes it easier for users and screen readers. CSS then helps with readability and flow. Keeping forms simple, mobile-friendly, and validating input on both client and server side ensures better responses. A clean design always encourages higher completion rates.
You have a select element here but you are not using it correctly. You also have a stray select tag directly after the closing select tag.
The select element should use option elements to create a dropdown menu, not radio buttons or other input and label elements. If you need radio buttons, they should be elsewhere, not inside a select element.