Error in my code (label)

What’s happening:
It says: «The new ‘label’ element should be located directly to the right of your checkbox. Make sure there is a space between the two elements».

  **My code for the moment:**

      <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>
          <label for="loving"><input id="loving" type="checkbox"> Loving</label>
        <input type="text" name="catphotourl" placeholder="cat photo URL" required>
        <button type="submit">Submit</button>
  **Información de tu navegador:**

El agente de usuario es: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36

Desafío: Step 55

Enlaza al desafío:

Hi @ale3hudy,

Read this, from the instructions, again :

Associate the text Loving with the checkbox,

by only nesting the text Loving in a label element.

You are nesting both the input and the text Loving in the label element.

1 Like

Hi! Thanks for your answer but I tried to do literally what is said and the code only passes in this way:

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

(Do you have Twitter? I’m starting in coding and searching allies! hahaha

hello ale did you ever solved that test am currently stuck there also am getting same result as you.