What is teh correct answer? (lesson 56 HTML)

There’s another way to associate an input element’s text with the element itself. You can nest the text within a label element and add a for attribute with the same value as the input element’s id attribute.

Associate the text Loving with the checkbox by nesting only the text Loving in a label element and giving it an appropriate for attribute.

my response is:

<label for="loving">Loving</label>
<input id="loving" type="checkbox">

but the sistem still mark like error

Hi there and welcome to our community!

For future reference, if you need help with a particular challenge, it’s best to hit the Help icon, which appears after you have submitted incorrect code three times.
This will create a forum post which automatically includes your full code, a direct link to the challenge and an opportunity for you to describe your issue in detail.
It also ensures that your code displays correctly on the forum (by enclosing it between two sets of triple backticks).

Your code is almost correct but your elements are in the wrong order. The input should come first, followed by the label (with a single space between them).

1 Like

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