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

<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="">
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>

  <input type='radio' name='indoor-outdoor'>
  <label for='radio'>indoor</label><br>
  <input type='radio' name='indoor-outdoor'>
  <label for='radio'>outdoor</label><br>
  **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/ Yowser/2.5 Safari/537.36.

Challenge: Create a Set of Radio Buttons

Link to the challenge:


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