Basic help <Im new>

it’s telling me "Each of your two radio button elements should be nested in its own label element.

I am completely new to this and don’t have a clue what I did wrong. Not go mention, I’m not even sure what nesting means or what the label element is. I’m following along witht he basic training and have copied the code and it still doesn’t work.

Your code so far


<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_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15.

Challenge: Create a Set of Radio Buttons

Link to the challenge:

Hello @sfdff3, welcome to the forum.

Nesting means uses an element within other, for example:

<div>
  <div> Hello FreeCodeCamp</div>
</div>

Is a “div” element nested in other “div” element.

That means that your “radio” elements, should be inside your “label” element.

That makes sense, thank you, but when I write this for the class it tells me that each of your two radio button elements should be nested in its own label element. What did am i doing wrong?

<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>

Hi ,

label
input
/label

input nested by label. Have good coding.