Learn HTML by Building a Cat Photo App - Step 56

Tell us what’s happening:

I’ve been trying to figure out where I’m going wrong for a long time. Can someone help me?

Your code so far

        <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>
        <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>

<!-- User Editable Region -->

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

<!-- User Editable Region -->

          <input type="text" name="catphotourl" placeholder="cat photo URL" required>
          <button type="submit">Submit</button>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36 Edg/

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 56

Would you care to explain what the issue is for clarification.

I see you followed the example nicely.
However, I think the label tags should be added to surround the text 'loving' where is it behind the input element. As well, the value assigned to the label for attribute should be 'identical' to the value of the id of the input element.

Happy coding!

Thank you very much for answering.
That’s what I did, that’s why I don’t understand what’s wrong. I put the lowercase letters every time I used the text “loving” so that they are the same and I enclosed it in label tags and it still keeps giving me the error “Sorry, your code does not pass. Hang in there.
The text Loving should be wrapped in a label element.”

What part of the code is wrong?

Your label should be after the input not before

Exercise 56 asks: "There is another way to associate the text of an input element with the element itself. You can nest the text inside a label element and add a for attribute with the same value as the id attribute of the input element .

Below is an example of using the for attribute to associate a tag with an input element:

Associate the Loving text with the checkbox by nesting only the Loving text in a label element and giving it an appropriate for attribute.

In the code I put:

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

I also tried adding “name and value” equal to “lovely” and I couldn’t. Any other suggestions?

do not move the word Loving, let it where it was, after the input element, and add the label element around that

Yeah!! It was that. Thank you very much