Learn Accessibility by Building a Quiz - Step 40

Tell us what’s happening:

Your code so far


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/ Safari/537.36

Challenge: Learn Accessibility by Building a Quiz - Step 40

Link to the challenge:

As with the other input and label elements, link the textarea to its corresponding label element, and give it a name attribute.

Textarea Label:

To display your code in here you need to wrap it in triple back ticks. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key. You may also be able to use Ctrl+e to automatically give you the triple back ticks while you are typing in the this editor and the cursor is on a line by itself. Alternatively, with the cursor on a line by itself, you can use the </> button above the editor to add the triple back ticks.

              <label for="myTextarea">
                Textarea Label:
              <textarea rows="5" cols="24" placeholder="Who is flexbox..." name="myTextarea" id="myTextarea"></textarea>

You have the right idea. You added a for attribute to the label and an id attribute to the input and you gave them the same value. That’s exactly what you want to do.

But you also changed things that you shouldn’t have. You changed the question text that was in the label and you moved the closing label tag.

I would restart the step to get the original HTML back. Then only add the for attribute and id attribute and do not change anything else.

1 Like

Understood thank you sir, my bad! confuse bcoz the textarea is not nested. I created new label element and nesting the textarea, not knowing that i should just add for attribute to the above label element and link the textarea to its corresponding label element, and give it a name attribute.

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