Learn Accessibility by Building a Quiz - Step 38

**The instruction says: Link the first label element to the select element, and give the select element a name attribute.

###The error says: You should give the select element an id attribute.
I dont know what’s wrong with my code. Pretty sure I got it right. Please help.

My code so far

        <div class="question-block">
          <label for="select-option">Are you a frontend developer?</label>
        </div>
        <div>
          <select id="select-option" name="select-option" required>
            <option value="">Select an option</option>
            <option value="yes">Yes</option>
            <option value="no">No</option>
          </select>
        </div>

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36

Challenge Information:

Learn Accessibility by Building a Quiz - Step 38

1 Like

Remove the hyphen from the attribute names, as this is not allowed for the id attribute.

Reset and try agen .Your code is right
Try to typit agen

Hi! I tried it. Still didn’t work

I’ve re-typed it multiple times already. I even closed my browser.

1 Like

Did you type it, or did you paste it? When I type your code, it’s passing… There might be some white space somewhere, maybe.

<div class="question-block">
              <label for="select-option">Are you a frontend developer?</label>
            </div>
            <div class="answer">
              <select id="select-option" name="select-option" required>
                <option value="">Select an option</option>
                <option value="yes">Yes</option>
                <option value="no">No</option>
              </select>
            </div>

Here is the formatted version… without white spaces. This is your code…

Opps, yes hyphens are allowed. The code looks correct. Maybe something is mistyped in the css.

Step 38 for this module is for the bio. Maybe something is not working there. Can you show what code you used there?

Thank you :slight_smile: I’ll do my best

2 Likes