Learn HTML by Building a Cat Photo App - Step 56

Tell us what’s happening:
Describe your issue in detail here.
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**
      <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>
      <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>
**<input id="Loving" type="checkbox"> <label> for="Loving"</label>**
        <input type="text" name="catphotourl" placeholder="cat photo URL" required>
        <button type="submit">Submit</button>
  **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.


Happy coding

1 Like

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

1 Like

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.

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