Learn HTML by Building a Cat Photo App - Step 56

Tell us what’s happening:

Hi there,

Stuck on Step 56 of Learn HTML by Building a Cat Photo App. Is anyone able to let me know what is wrong with line 44? (Full code below)
Not sure if I’m breaking any rules here but for ease of reference line 44 (without the spaces after less than sign “<”) is:
< input id=“loving” type=“checkbox”>< label for=“Loving”> Loving< /label>

I need 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.
Note: I have also tried: label for=“loving” (in lower case)

Link in case:

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <section>
        <h2>Cat Photos</h2>
        <!-- TODO: Add link to cat photos -->
        <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</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>
      </section>
      <section>
        <h2>Cat Lists</h2>
        <h3>Things cats love:</h3>
        <ul>
          <li>cat nip</li>
          <li>laser pointers</li>
          <li>lasagna</li>
        </ul>
        <figure>
          <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>  
        </figure>
        <h3>Top 3 things cats hate:</h3>
        <ol>
          <li>flea treatment</li>
          <li>thunder</li>
          <li>other cats</li>
        </ol>
        <figure>
          <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>  
        </figure>
      </section>
      <section>
        <h2>Cat Form</h2>
        <form action="https://freecatphotoapp.com/submit-cat-photo">
          <fieldset>
            <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>
          </fieldset>
          <fieldset>
            <legend>What's your cat's personality?</legend>

<!-- User Editable Region -->

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

<!-- User Editable Region -->

          </fieldset>
          <input type="text" name="catphotourl" placeholder="cat photo URL" required>
          <button type="submit">Submit</button>
        </form>
      </section>
    </main>
  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Safari/605.1.15

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 56

you’re have a spacing issue and an attribute value issue.

First return the for attribute value back to loving as that will match the id you want.
Then remove one space from the immediate left of the word Loving
and add one space in between the input and label elements.

2 Likes

A good indicator here is to check out thecode above. your coding shoule be similar.

the coding you used for the “ndoor” and outdoor is sytantactically correct and is what you should Ideally aim for.
Not only does it correct the issue you are having it will also look a lot cleaner.

Thanks so much for your advice - it worked! :smiley:

1 Like

Loving

This is the code that is working for me.
In the for attribute we have to associate it with loving not Loving

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

1 Like

Hello I face the same problem in step 56 of learn html by building A Cat Photo App.

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Help button located on the challenge. This button only appears if you have tried to submit an answer at least three times.

The Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

1 Like