Cat PhotoApp step 55

Tell us what’s happening:
i have been stuck on this step for hours, someone please help! :face_with_spiral_eyes:

There’s another way to associate an input element’s text with the element itself. You can nest the text within a label element and add a for attribute with the same value as the input element’s id attribute.

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 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/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Safari/537.36

Challenge: Step 55

Link to the challenge:

there’s few mistakes here , first you didn’t close the label tag,and the text “Loving” should be between the opening and closing label tags

Thanks for the reply!
i tried it and it still did not pass unfortunately :confused:

i tried the label element with opening and closing tags with the attribute for=“loving” nested between, and i also tried just nesting the word Loving in between without the for attribute but no luck

can you pleas share your new code in a replay

<label> for="loving" </label>

so the attribute for should be inside the opening label tag ,attributes are always inside html tags ,also the word Loving with a capital L should be between the label tags ,so you need the word loving twice ,once in the for attr and a second time as a text but be sure of how to write it because it’s differnt in both cases

i really appreciate the help/patience! okay, this is what i have, still a few issues:

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

you still need the closing sign “>” for the first label tag and still missing the text “Loving” between the tags ,also for attr value should be identical to the id value of the checkbox so copy that

1 Like

Yesss i got it, thanks for all of the help! :love_you_gesture:

1 Like