Radio button page

hello,
I have been trying to clear this radio button test but I get confused with the label and the form element.
could you help me?

Regards,
Abha Agarwal.

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">
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>
<form>
<lable for="indoor">
       <input id="indoor" type="radio" name="indoor-outdoor"> indoor
    </lable>
    </form>
    <form>
    <lable for="outdoor">
      <input id="outdoor" type="radio" name="indoor-outdoor"> outdoor
      </lable>
      </form>
</main>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36.

Challenge: Create a Set of Radio Buttons

Link to the challenge:

Hello there,

The instructions:

Add a pair of radio buttons to your form, each nested in its own label element.

You do not need to create another form.

Hope this helps

Hey @aabha153!

You’ve to nest your radio buttons inside a single form element. Your code contains two form element. You should have only single form element.

You also seems to have misspelled the word label in your code.

form tag is for the whole form (in this case, radio buttons, checkbox buttons and submit button). It’s used to collect some user input from the entire form (when you click submit or something like that). So use only 1 per form.

label represents a caption for an item. If you have for example some survey, there are the multiple choice answers. And every choice has their own label tag. Also you misspelled it in your code.

1 Like