Learn HTML by Building a Cat Photo App - Step 56

Hello, can’t seem to understand what I’m doing wrong on this one if anyone can help?

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


The text Loving should be nested within the new label element. You have either omitted the text or have a typo.

  1. Remember to close > the starting label tag.

  2. The new label element should have a for attribute with the value loving . Expected loving , but found Loving .

The for attribute starting letter case matters.

Hey, thanks for your response. It still doesn’t seem to work, whenever I delete the close > next to the label element, everything goes black again.

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

The for attribute should be inside the starting <label> tag. As all attributes are.


<input id="name" type="text"><label for="name">Enter name:</label>
<input id="loving"type="checkbox"><label for="loving" >loving</label> 

Sorry still can’t get it! IT all looks like it should work without the > between the second two lovings as all red and blue but then when I add the > as per your response, everything goes black /:

nesting the text Loving in a label element

  1. Capital L for the label text Loving

  2. Make sure there is a space between the two elements.

The same example as before but with a space just in case it isn’t clear

<input id="name" type="text"> <label for="name">Enter name:</label>

FYI. I’ve edited your code for readability.

Use the “preformatted text” tool in the editor (</>) to add backticks around the code to get the proper code formatting.

Sorry, I’m really trying but I’m just not getting it…

I have amended the label Loving to a capital letter & added a space between the elements.

<input id="loving" type="checkbox"> <Label for="loving"> Loving</Label>
````Preformatted text`

The element name is label not Label

I swear I tried that before and it didn’t work! ha It’s done, thank you so much! :slight_smile:

1 Like

Good job. Keep at it.

1 Like

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