Learn HTML by Building a Cat Photo App - Step 55

I’ve got this problem:
I was told to “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.”
So I did it and it is the result:

      <legend>What's your cat's personality?</legend>
    <input id="loving" type="checkbox">
    <label> Loving </label>

Now I was told it is wrong, that I should do: " The new label element does not have a for attribute. Check that there is a space after the opening tag’s name."
Sorry I have no idea about what is wrong or what I should do. It’s a bit confusing.

This tag does not have a for attribute, so that error message is correct.

Jolly well, but I didnt use the for attribute, see what I did:

<label> Loving </label>

No for, so no error. The message is wrong per se because it is seeing a for that it isn’t there.

This your error message, right? That is saying that you do not have a for attribute even though a for attribute is required.

Side note - you didn’t provide a link to the challenge, which makes it harder for us to help.

Here you are, the link:

Right. A for attribute is required/mandatory. You must add this attribute to the opening label tag.

Thank you so much. Now it is solved.

1 Like

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