NEED HELP HTML by Building a Cat Photo App - Step 56

Need help with knowing how to place the label element around Loving

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <section>
        <h2>Cat Photos</h2>
        <!-- TODO: Add link to cat photos -->
        <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</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>

<!-- User Editable Region -->

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

<!-- User Editable Region -->

          </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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

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

Link to the challenge:

1 Like

You have the entire input in your label. As the directions say the only thing that should be between your label tag <label></label> is the word "Loving "provided by the challenge.

Dont forget about the second part of the challenge
" giving it an appropriate for attribute."

2 Likes

Put the label around the word “Loving” and this is what it’s hinting “The new label element does not have a for attribute. Check that there is a space after the opening tag’s name.” How do I add a ‘for’ attribute to my new code?

1 Like
1 Like

Can you tell me how to implement “for” to my code

Did you take a look at the link I sent? It shows exactly how to add it

You need to put it in the opening of the label tag.

an example would be

<label for="something here"></label>
2 Likes

You are missing the actual text “Loving” that is supposed to be between your label tags

You need the for attribute, and you need to have the text wrapped in the label tags to pass this challenge

2 Likes

In the picture I sent I have both the labels and the text Loving with the for attirbute and is still not passing I’m assuming my layout for it is wrong?

I have the Label with the for attribute with the text Loving at the very end. I’m assuming my order is wrong.

In the screenshot? You have no text “Loving” thats the issue. There should be text “Loving” in between your label tags. The for attribute doesnt count

3 Likes

I wrote it the same way as the example you sent can you show me how mine is supposed to look

That was an example of how to add a for. It shouldnt of been copied. What do the directions say? You need to have the text loving wrapped in the label. Forget about the for attribute for a second. Take it out of your mind. With that gone, how would you give the label the “Loving” text?

1 Like

Now add the for back where it was. The loving for the for attribute may need to be lower case

1 Like

Why did you remove the text between the labels? All I said was add the for back, nothing should have been removed from that last code

1 Like

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