Learn Accessibility by Building a Quiz - Step 38

Tell us what’s happening:
It is saying that my label element should be given a for attribute, I have done this but not sure where I went wrong :confused:
Your code so far

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.

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

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36

Challenge: Learn Accessibility by Building a Quiz - Step 38

Link to the challenge:

1 Like

You have added an additional <select> element. You should instead give the existing <select> element a name and id attribute.

2 Likes

Link the first label element to the select element

See here: https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-html-by-building-a-cat-photo-app/step-56

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.