General html question

Hi! Here is my code:

<section role="region" aria-labelledby="html-questions">
          <h2 id="html-questions">HTML</h2>
          <div class="question-block">
            <h3><span class="sr-only">Question</span>1</h3>
            <fieldset class="question" name="question1">
              <legend>The <div> element is used to define a clickable button in HTML.</legend>
              <ul class="answers-list">
                <li></li>
                <li></li>
              </ul>
            </fieldset>
          </div>
          <div class="question-block">
            <h3><span class="sr-only">Question</span>2</h3>
            <fieldset class="question" name="question2">
              <legend>The <a> tag is used to create hyperlinks in HTML.</legend>
              <ul class="answers-list">
                <li></li>
                <li></li>
              </ul>
            </fieldset>
          </div>
        </section>

But got an error: You should give the first ul element a class of answers-list.
What it can be??

1 Like

if this is from the curriculum, please give a link to the step

for next time please use the HELP button

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Help button located on the challenge. This button only appears if you have tried to submit an answer at least three times.

The Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Thank you, I pressed the Help and was assigned here. Probably , I’ve confused smth, sorry.
The challenge is “Learn Accessibility by Building a Quiz”, step 28

pressing the button creates a template for a post here on the forum that contains your code and a link to the challenge, and that you can edit if needed before posting.

Please share a link to the step

Hi,

these are the problems. you made <div> and a opening tags, html reads it as an element, not a text content inside the <legend>.

use character entity reference instead. for instance, to make a less than sign, you need to type &lt;, and it will show like this <. that way, you can put html reserved characters applicable as text contents.

1 Like

Wow! Now it works! Thank you a lot!!!

2 Likes