Learn HTML by Building a Cat Photo App - Step 58

I’ve been trying to do this exercise, but I’m completely lost at this point. It gives me this message: "On the right side of your new checkbox, there should be label element with the text Lazy . But the label is there. What am I missing?

This is my code:

<input id=“loving” type=“checkbox” name=“personality” value=“loving” Loving

        <input id="lazy" type="checkbox" name="personality" value="lazy" <label for="lazy">Lazy 
        </label>
<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>
          <label for="loving">
          <input id="loving" type="checkbox" name="personality" value="loving">Loving 
          </label>
          <label for="lazy"
          <input id="lazy" type="checkbox" name="personality" value="lazy">Lazy 
          </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/105.0.0.0 Safari/537.36

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

Link to the challenge:

Right now the input element is nested inside a label element.

Try moving the label opening tag now to the right hand side of the input.
(That is what the hint is trying to tell you).

So, you mean to place the label opening tag after the word “input” instead?

yes, that’s what they want.

I did it but the message is still the same. Here it is:

<input Loving

        <input <label for="lazy" id="lazy" type="checkbox" name="personality" value="lazy">Lazy 
        </label>

oh dear, what happened to the input element?
edit:
<input id="lazy" type="checkbox" name="personality" value="lazy">
This is what you had before
(and that is an input element)

But what you have now is not valid HTML

I inserted the <label for = “lazy” after the word input at the beginning. So, that’s wrong… I’ll fix it, but I’m completely lost. Where it’s supposed to go?

this is what I have now:

<label for="loving"
            <input id="loving" type="checkbox" name="personality" value="loving">Loving 
            </label>
            <label for="lazy"
            <input id="lazy" type="checkbox" name="personality" value="lazy">Lazy 
            </label>

I see the issue now.
You need to know that the input element is the whole line starting from <input and ending in >

So when someone says to put an element after that, they mean to go somewhere to the right of the > to add more code.

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Ah okay!! Let me try it again

I will do it, thank you!

I had to fix a few more things but it worked, thank you so much for your help!

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