Create a Set of Radio Buttons (broken challenge?)

Tell us what’s happening:

Im quite literally doing what the challenge says and its not letting me pass. Assist plZ?

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>
<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>
</form>
</main>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36.

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

Hi there, so you are almost there. The instructions say: Add a pair of radio buttons to your form, each nested in its own label element. One should have the option of indoor and the other should have the option of outdoor . Both should share the name attribute of indoor-outdoor to create a radio group.

In the code you wrote above, you have the input tag first and then the label. Try to put the input inside of the label.

The format that was given in the instructions looks like this:

> <label for="indoor"> 
> <input id="indoor" type="radio" name="indoor-outdoor">Indoor 
> </label>

Try it and let us know if you figure it out. Good luck!

Worked put perfectly, i was missing one simple thing. I appreciate it!!

1 Like