Learn HTML by Building a Cat Photo App - Step 56

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

Your code so far

I have nested the text within a ‘lable’ element and add a ‘for’ attribute with the same value as ‘input’ element. Thus, my label elements include for=“Loving” and id=“loving” as in

I don’t understand the context of nesting it. Does should be nested inside ?

<html>
  <body>
    <h1>CatPhotoApp</h1>
    <main>
      <section>
        <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>
      </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>
            <label for="Loving" id="loving"></label>
            <input id="loving" value="loving" type="checkbox">
          </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/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36

Challenge: Learn HTML by Building a Cat Photo App - Step 56

Link to the challenge:

  • the exercise wants the label on the right-hand-side of the input, so please move it there.
  • the label does not need an id attribute
  • but it does need a for attribute whose value is equal to the input’s id value
1 Like

Associate the text Loving with the checkbox by only nesting the text Loving in a label element and place it to the right side of the checkbox input element.

Your label is not to the right side of the checkbox, so you’ll need to change that up.

‘Nesting’ ist the term we’ve been using that means ‘put one thing inside of another’, so you neet do put the text ‘Loving’ between the opening and closing label tags.

Also note that the capitalization of the for attribute must exactly match the capitalization of the id attribute.

1 Like

By nesting the text “Loving” into label tags + matching the capitalisation of ‘for’ and ‘id’ meaning:
Loving?

the value of the input id right now is “loving”

but the label should be placed around the word Loving

So 2 different things.

Here’s a label that nests around the word “Funny”
<label>Funny</label>

Mod edit: solution removed

hello, please don’t post solutions on the forum.
I hope this means thought that you got it to work?

Oh, it’s my first day on this forum and I didn’t know we were not allow to post solutions on here. I just wanted to ask if my solution was correct.

I will be careful! Thanks

no worries, did you pass the step?

yes it did! than you :slight_smile:

I stuck on this step too. I dont understand this at all

If you have a question about a specific challenge as it relates to your written code for that challenge, and you’ve tried to solve it at least 3 times so far and still need some help, just click the Ask for Help button located on the challenge (it looks like a question mark).
This 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.

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