Learn HTML by Building a Cat Photo App - Step 56

Tell us what’s happening:
Describe your issue in detail here.

Can someone tell me what am I doing wrong here?

Your code so far

        <h2>Cat Photos</h2>
        <!-- TODO: Add link to cat photos -->
        <p>Click here to view more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a>.</p>
        <a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
        <h2>Cat Lists</h2>
        <h3>Things cats love:</h3>
          <li>cat nip</li>
          <li>laser pointers</li>
          <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate.">
          <figcaption>Cats <em>love</em> lasagna.</figcaption>  
        <h3>Top 3 things cats hate:</h3>
          <li>flea treatment</li>
          <li>other cats</li>
          <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg" alt="Five cats looking around a field.">
          <figcaption>Cats <strong>hate</strong> other cats.</figcaption>  
        <h2>Cat Form</h2>
        <form action="https://freecatphotoapp.com/submit-cat-photo">
            <legend>Is your cat an indoor or outdoor cat?</legend>
            <label><input id="indoor" type="radio" name="indoor-outdoor" value="indoor"> Indoor</label>
            <label><input id="outdoor" type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label>
            <legend>What's your cat's personality?</legend>
            <input id="loving" type="checkbox"> <label> for="loving" </label>
          <input type="text" name="catphotourl" placeholder="cat photo URL" required>
          <button type="submit">Submit</button>

looks like you forgot to close your first before you started the second one

Im sorry that was wrong I need to put my glasses back on

I nested the text loving but it still says it’s incorrect and keep getting: The new label element does not have a for attribute. Check that there is a space after the opening tag’s name.

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

Hi there.

This is the opening tag for label correct?


The for attribute should go inside this label. (The way you wrote it inside angled brackets alone is how you would write an element, not an attribute)

Then between the opening and closing tags of the label you need to add back the word Loving that you removed.

Hope this helps.

Thank you for your help! I thought an element should have an opening and closing tag, so shouldn’t the label have > tag? So, this how I understood what you told me and it’s still incorrect. I’m really confused.

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

Please re-read what I said. I never said anything about the angled brackets being removed.
I just said if you have this <label> which is a label opening tag
you need to add the for inside that (don’t remove the angled brackets, just add for=“whatever” inside that tag.

After that you need the word Loving to be the text of the label.

The text - that means put the word Loving between the opening and closing tags of the label.

(just like you would create a h1 element with some text inside like this <h1>This is the text</h1>)

1 Like

Thank you so much for explaining it so clearly! I’ve been stuck at this for hours and just passed it :smiling_face_with_three_hearts:

1 Like

just remember, because this question will come again later, the for attribute is always used in the label tag. The value of the for must match the id of another element (like input but not always).

Share you correct answer

Sharing code is not allowed for fCC challenges. Please don’t ask for it.