Learn HTML by Building a Cat Photo App - Step 56

I have read all other blogs on the topic about this specific step but I still seem to do something wrong and can’t figure out what… The question is Step 56

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.

My code is:

The console states that I do not have a for statement… In my opinion i processed this correctly. Maybe someone can help me?

Thanks a lot!

could you post the code here?

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

Yes this code is correct. Have you made any other changes in the already given code?

input should rather be nested in label

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

This is not required in this challenge.

You mean the code prior to the challenge?

label cant be nested in input. it has to be other way round

Thank you, finally got it! :slight_smile:

1 Like

can you share answer

In the code there was already a <input id="loving" type="checkbox"> which had to be removed. Otherwise it made two checkboxes, and it only requires one!