Radio Buttons and Checkboxesz

Tell us what’s happening:

I numbered where I think the error is (1-4) but I don’t see it. It seems to me that both labels are nested in it’s own labels <label :thinking:

I would appreciate any assistance.

“Each of your two radio button elements should be nested in its own label element.”

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

1. <input id="indoor" type="radio" name="indoor-outdoor">
2.   <label for="indoor">Indoor</label>
3.   <input id="outdoor" type="radio" name="indoor-outdoor">
4.   <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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36.

Challenge: Create a Set of Radio Buttons

Link to the challenge:

hi @Tamalone

did you following the example as described at the info tab?
Here’s an example of a radio button:

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

This is how they want you to do it:

Indoor


Outdoor

This is how they want you to do it:

Indoor


Outdoor

Bekeledg, thanks for your help but I am still receiving an error. Everything is correct except each of the two radio buttons elements should be nested in its own label element.

Here is the error:

Each Of your two radio button elements should be nested in its own label element…

Indoor outdoor Submit

This is how you should do it:

Indoor

Outdoor

This is how they want you to do it:

Yes, you were correct. I thank you! :nerd_face:

1 Like

Hey Bekeledg, quick question: I was a little confused about the slash: I took it out the code and it still worked.

name=“Indoor-outdoor”/ :point_left:>Indoor

Oh yeah, it should have not been there. Sorry.