What is wrong with my Radio button?!? I can't seem to get it right

Tell us what’s happening: I’m trying to create a set of radio buttons and I can’t seem to get it right? Can someone please tell me my problem? Thank you!

Your code so far


<h2>CatPhotoApp</h2>
<main>
  <p>Click here to view more <a href="#">cat photos</a>.</p>
  
  <a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
  
  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form action="/submit-cat-photo">
<input id="indoor" type="radio" name="indoor-outdoor">
<label for="indoor">Indoor</label>
<input id="outdoor" type="radio" name="indoor-outdoor">
<label for="outdoor">Outdoor</label>

    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</main>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/create-a-set-of-radio-buttons/

Close!
Add a pair of radio buttons to your form, each NESTED in its own label element.

I think I might have an idea. Check out the attached photo.

First, thank you for responding. Second, the label element should be before the input id?

Thank you… I still don’t see my error though .

Hi,
Nesting means wrapping one element between the opening and closing tags of another.

For instance if you were to nest a <p> element in a <div> element

<div>
   <p> My Paragraph</p>
</div>

Thank you!! That was most helpful!!:slight_smile: