Help in radio buttons <label></label> ? ^_^

Tell us what’s happening:
Tas is ‘Each of your two radio button elements should be nested in its own label element.’

Scroll until end.

Help <?/>
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="https://freecatphotoapp.com/submit-cat-photo">
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>

<form>
  
  <input type='radio' name='indoor-outdoor'>
  <label for='radio'>indoor</label><br>
  <input type='radio' name='indoor-outdoor'>
  <label for='radio'>outdoor</label><br>
</form>
</main>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.152 YaBrowser/21.2.2.102 Yowser/2.5 Safari/537.36.

Challenge: Create a Set of Radio Buttons

Link to the challenge:

Blockquote

This is not the first time that nesting has been introduced in the lessons.

The lesson gives an example of nesting the radio button in the label element. Revisit it and see how your code varies.

On a side note, while it won’t make the test fail there was already a form element you could have placed the radio buttons in. You didn’t need to create an additional one.

Thank you for answer. but i still dont get it what is wrong. I tried a lot of options.
tries to put there id and for attributes, but still wrong

the id(input element) and for(label element) attributes should counterpart.

they match. thank you for answer. i fixed my problem :slight_smile:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.