Learn Accessibility by Building a Quiz - Step 38

Tell us what’s happening:

I already give select element an id, but it doesn’t work when I submit the answer.

Your code so far

<!-- file: index.html -->
<!-- User Editable Region -->

            <div class="question-block">
              <label for="q3-a1">Can the CSS margin property accept negative values?</label>
            </div>
            <divclass="answer">
              <select id="q3-a1" name="q3" required>
                <option value="">Select an option</option>
                <option value="yes">Yes</option>
                <option value="no">No</option>
              </select>
            </div>

<!-- User Editable Region -->
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15

Challenge Information:

Learn Accessibility by Building a Quiz - Step 38

Hi there and welcome to our community!

<divclass="answer">
  <select id="q3-a1" name="q3" required>
    <option value="">Select an option</option>
    <option value="yes">Yes</option>
    <option value="no">No</option>
  </select>
</div>

The error message is a little misleading as your id attribute is correct. However, you’ve lost a space before the class attribute in the div element above it (a syntax error).

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