Learn HTML by Building a Cat Photo App - Step 56

Tell us what’s happening:
Describe your issue in detail here.
Hi!
I need to know what I have done wrong.
The step is to associate the text Loving with the checkbox by only nesting Loving in a label element and place it to the right side of the checkbox input element. You will find it inside of ** **

  **Your code so far**
<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>
**<input id="Loving" type="checkbox"> <label> for="Loving"</label>**
        </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/13.1.3 Safari/605.1.15

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

Link to the challenge:

I think you just added the ** for the forum right (it isn’t proper HTML so it should not be in your code)

So anyway, I see your label tags are created but your for attribute is not where it should be.
ALL attributes in HTML should be placed in the respective opening tags of their elements.
In this case, for should be inside the label opening tag.
Also the for attribute requires a value which is identical to the value of the id attribute of the linked element. (We want this label to link back to the input so we should use the same value of the input id in the label’s for)
Finally the label is supposed to be nested around the word Loving so that it shows up next to the checkbox on the right-hand-side.

Try the above and see how far you can get.

1 Like

3 errors spotted …

  1. the for attribute with the text loving should be inside the opening tag of the label element.
    the syntax for attribute is
<element attribute="text"></element>
  1. the text in the attribute should match the text in the input id.
    i.e it should be loving not Loving.

  2. a text with Loving should be nested within the label element.
    eg

<element>Loving</element>

Happy coding

1 Like

Hi!
Thank you very much, I finished the step by reading the instructions you and hbar1st wrote. :slight_smile:

1 Like

Hi!
Thank you very much, I finished the step by reading the instructions you and dannee wrote. :slight_smile:

pass the solution! dasdasfsadfdsafasdfsda

Please stop spamming other people’s topics. Thank you

Writing the solution for other users is against the rules.