Learn HTML by Building a Cat Photo App - Step 56

I do not understand what this is trying to explain anymore. So it says i need to ‘nest’ the text ‘Loving’ using the label elements. The way it is worded sounds like you want me to wrap only the ‘Loving’ text , but its also asks me to ‘nest’ the text. So i need clarity on what exactly this step needs done. Am i trying to wrap the ‘label’ element and ‘for’ attribute with the input OR am i nesting the whole input under ‘label’ element and adding in ‘for’ attribute to equal value of id? The latter does not let me pass the challenge so it seems it is not the latter. I have tried the former obviously, i need clarity i dont understand where the directions are trying to lead me, thank you.

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

          <label for="loving"
            <input id="loving" type="checkbox"> 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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 56

This label has more inside of it than the letters ‘Loving’. The instructions are telling you to wrap only ‘Loving’ and nothing else in the label element.

Also, your opening label tag is missing a >

So I’ve turned it around and have come up with this:


So I’ve learned I have to put the label element inside of the input though this is the tricky part I can’t seem to solve. So there is only supposed to be one “Loving” though how do I create the ‘for’ value without another “Loving”? as well as the challenge says I am not wrapping “Loving” so I am placing the labels wrong somehow and can’t see how.


Also tried to move label element, thought maybe that was an issue, did not work so I moved on to a few other ideas I could think of. I tried wrapping “Loving” it’s self at the end of the line though that takes away the text inside the box that needs to be kept. Another pointer please?

Hello @NivekCortes !

It does not need to be entered into the input element.

Here is an example that I hope will help you.

<input><label>text</label>

Thats another weird issue i came across, When i and close off the elment with > everything after is not valid . So I have to keep label element open until i finish ‘for’ value yes? That was my path of thinking and the only way i can get ‘for=value’ to actually be valid.

ahhh, ok, thanks I’ll get back to it

1 Like

Broooo I saw it now. Wrap “Loving” after the element and what tripped me up were the words. That was a good lesson on attention to detail. Thanks to Jeremy and you Gray. Cheers!

2 Likes

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