Create set of Radio buttons

Create set of Radio buttons

What is the problem in this code. It works fine in a notepad and in your website, but i could not access the next activity. If there is any problem in the way i use English, sorry in advance.

<form action="/submit-cat-photo">

<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>

<input type=“text” placeholder=“cat photo URL” required/>

<button type=“submit”>Submit</button>


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

you should nest the input inside the label not the other way.

1 Like

Thanks for the solution @Turncoat

1 Like

Hi bro its still asking that( Give your radio buttons the name attribute of indoor-outdoor).Kindly tell me.I have been stuck here for a long timee

so 1st thing we do is find where the code go if u read the intsruction u will find its between

 <form action="/submit-cat-photo">
your code goes here
    <input type="text" placeholder="cat photo URL">

Then we take a look at the example and what they did ask us and copy paste it a few times and change it up a bit. make sure you change the last 2 lines to outdoor since that is in our task.

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

brooo i have written the same thing there but its still asking that
Each of your two radio button elements should be nested in its own label element
Give your radio buttons the name attribute of indoor-outdoor
I am copy pasting the same thing but its still not working
Kindly help me i am stuck here for a very long time

this one works with me try a diffrend browser :3/ also the hint they gave u was Each of your two radio button elements should be nested in its own label element.