Radio button page

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?

Abha Agarwal.

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

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