I cant solve step 55?

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

Step 55

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

      <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"> Loving
          <label for="Loving"> Loving </label>
        <input type="text" name="catphotourl" placeholder="cat photo URL" required>
        <button type="submit">Submit</button>

Challenge: Step 55

Link to the challenge:

1 Like

HI @vinayaksharma2777 !

Welcome to the forum!

You have a couple of issues.

You wrote Loving twice which means we are seeing this result in the preview window
Screen Shot 2022-05-19 at 7.20.30 PM

It should only show once.

You correctly placed the Loving text inside the label tags here

but you need to remove this Loving text here so it doesn’t appear twice

You need to read the new error message very carefully to fix the error for the for attribute

The new label element should have a for attribute with the value loving
Hint: You have an error with capitalization here

Once you fix those things, then the test will pass


Thanks! I got it
this was the correct one.

yor Loving should inside label element and value of for should be similar with id value …u cant use capital L in loving for for value

1 Like

I managed to solve it with this.

For (open tag) = <; (close tag) = >

(open tag)input id=“loving” type=“checkbox”(close tag)
(tag) label for=“loving”(close tag)Loving(open tag)/label(close tag)


it took me 40mins
open tag label for=“loving”>Loving</label close Tag

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