Create a Set of Radio Buttons, why am I wrong

**Tell us what’s happening:**Why am I wrong?



Your code so far

<p>Click here to view more <a href="#">cat photos</a>.</p>

<a href="#"><img src="" alt="A cute orange cat lying on its back."></a>

<p>Things cats love:</p>
  <li>cat nip</li>
  <li>laser pointers</li>
<p>Top 3 things cats hate:</p>
  <li>flea treatment</li>
  <li>other cats</li>
<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>


Your browser information:

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

Challenge: Create a Set of Radio Buttons

Link to the challenge:

You need to nest the radio buttons inside of labels, as shown in the written challenge description.

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

I tried all that I could. The option shows alright but I cannot proceed. Could you help me to get nesting done right?
Thanks JeremyLT.

Is there a part of the example I can help explain better?

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

You don’t want to exactly duplicate the video in this case, as the video is not fully up to date with the written challenge description. When the video and the challenge description disagree, the written description is always correct.

1 Like

Thanks JeremyLT. I tried both ways but am not getting the nest right.

<input id="outdoor" type="radio" name="indoor-outdoor">

  <label for="outdoor">Outdoor</label>

This way too


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

<label for="indoor">

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


  <input type="radio" name="indoor-outdoor">Outdoor</label>

<input id="outdoor" type="radio" name="indoor-outdoor">

  <label for="outdoor">Outdoor</label>

You need to click the </> button to wrap your code in backticks ``` so that we can see it.

Thanks JeremyLT! I am grateful

I’ve edited your post 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.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.


(@JeremyLT done!)

if this is your code you have too many elements.

you need only two radio buttons