Learn HTML by Building a Cat Photo App - Step 56

Tell us what’s happening:
I feel like i’ve tried 30 different possible combinations of how to nest the “for” element but none of them pass? I read all the suggestions on the question 56 thread, but still not getting it.

Your code so far

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

<!-- User Editable Region -->

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

<!-- User Editable Region -->

          <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/ Safari/537.36

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

Link to the challenge:

Do not move the word ‘Loving’. It needs to stay exactly where it starts. Immediately before that one word (and nothing else), put the opening label tag. Immediately after that one word, put the closing tag.

i tried that and it still fails. but also i thought the purpose of lesson 56 was to use the “for” element? Here is the current code.

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

The HTML code snippet you provided appears to be largely well-formed, but it has an error in the input element tag that is missing a value attribute

Your label and word loving needs to come after the input

1 Like

You are still moving the position of the word Loving. It needs to stay after the input.

In general, don’t change things unless the lesson asks you to. Moving pieces around confuses the tests!

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

my bad. won’t happen twice

check the line after your for=“loving”
seems there’s a typo

finally got it, just had to swap the order of the lines…
input line/element first, label line/element second

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