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**
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more <a target="_blank" href="">cat photos</a>.</p>
      <a href=""><img src="" 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="" 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="" alt="Five cats looking around a field.">
        <figcaption>Cats <strong>hate</strong> other cats.</figcaption>  
      <h2>Cat Form</h2>
      <form action="">
          <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/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

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