Learn HTML by Building a Cat Photo App - Step56

Tell us what’s happening:
I’m currently on step 56 and i cant get past it . it keeps asking me to Associate the text Loving with the checkbox by nesting only the text Loving in a label element and giving it an appropriate for attribute. I’ve tried so many times , what could i be doing wrong ?

Loving

Loving

Link to the challenge:

To display your code in here you need to wrap it in triple back ticks. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key. You may also be able to use Ctrl+e to automatically give you the triple back ticks while you are typing in the this editor and the cursor is on a line by itself. Alternatively, with the cursor on a line by itself, you can use the </> button above the editor to add the triple back ticks.

What do you think this means you should do?

Alright , had no idea . Thank you

Nesting the text LOVING in a label tag ?

yes, and also give it target with same text

1 Like

Yes, but you just repeated what the instructions said to do. What does that actually mean. How do you nest the text Loving in a label element? Either show us with code or describe it in your own words.

If you want to show us with code then you need to add it properly in here so we can see your actual code. To display your code in here you need to wrap it in triple back ticks. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key. You may also be able to use Ctrl+e to automatically give you the triple back ticks while you are typing in the this editor and the cursor is on a line by itself. Alternatively, with the cursor on a line by itself, you can use the </> button above the editor to add the triple back ticks.

Okay here’s my code .

<input id="loving" type="checkbox"> Loving
            <input type="checkbox" id="loving">
            <label for="loving" text="lOVING"</label>
             
1 Like

It looks like you added a second checkbox input for Loving? I don’t think you want to do that. I would restart the step to get the original HTML back.

You want to do two things:

  • Nest the text Loving in a label element (you did not do this correctly)
  • Add the proper for attribute to the label element so it is associated with the input (you did this correctly)
1 Like

I’ll restart right away.

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

thank you , finally fixed it . I did’nt realise my second checkbox was part of the error.

2 Likes

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