Basic HTML and HTML5: Create a Set of Radio Buttons cant complete

it is not allowing me to complete Basic HTML and HTML5: Create a Set of Radio Buttons beacuse it says -Each of your two radio button elements should be nested in its own label element. I think i am doing that in my code however i might be wrong so could you help me out

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

Challenge: Create a Set of Radio Buttons

Link to the challenge:

Take another look at the lesson above the challenge. You will notice that you <input>s are not nested inside the <label></label> tags.

Look at this structure:

<tag>
     <nested-tag>A sentence inside the nested tag.</nested-tag>
</tag>
1 Like

As@leebut said you should nest the input inside the label
e.g

<label for="hard">
  <input id="hard" type="radio"name="pope">Hard
</label>

oh ok thanks for the help