The radio challenge

the label code challenge I can see I did the whole steps right but I couldn’t understand the hints to get the last result:

  • Each of your two radio button elements should be nested in its own label element.
  • Each of your radio button elements should be added within the form tag.

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>

<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>
<form action="/submit-cat-photo">

 <input type="text" placeholder="cat photo URL"required>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.2; 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:

 <label for="indoor">
    <input id="indoor" type="radio" name="indoor-outdoor">Indoor
    <label for="outdoor">
     <input id="outdoor" type="radio" name="indoor-outdoor">Outdoor

This is the correct use of and (each input haves a label wraping it)

Hello, welcome to the forum :slight_smile:

Besides bigclown has commented I notice that you’ve missed the closing form tag. Remember to put inside your form tags the labels and inputs, (that’s was specified in the second hint)

…your labels with the inputs inside

Hope it helps :slight_smile:

1 Like