Label Problem - Responsive Web Design (beta)

Hello,

I have a problem with this line of code:

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

I get the following hint:
The text Loving should no longer be located directly to the right of your checkbox. It should be wrapped in a label element.

So in my understanding, if the text ‘loving’ should not be at the right of the checkbox, I should at least get a more specific place to display the text? Maybe there is an issue since it’s beta, which I highly doubt, I probably miss something here.

Anyone any tips?

This is the step explained in case it helps:

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 only nesting the text Loving in a label element and place it to the right side of the checkbox input element.

It would help if you also provided the link to the challenge.

Here you go:

The challenge wants you to create a label element underneath the input.
In between the label elements is where the the Loving text goes

1 Like