Topic "create a radio button"

Tell us what’s happening:

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

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

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

  <input type="text" placeholder="cat photo URL" required>
   <button type="submit">Submit</button>

Your browser information:

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

Challenge: Create a Set of Radio Buttons

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

The more information you give us, the more likely we are to be able to help.

hello All, can someone tell me the issue please. I am doing the radio button test and pasted all but last. says the radio button elements should be added within the form tag.
thank you Michael

I believe that you are confusing the test suite because you nested the buttons inside of labels incorrectly. Here is the example from the written challenge description:

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

remove <label> for <form> and </label> after </form> and it works!

@pkusaha Instead of posting solutions, try to help people instead by guiding them. Also, your code is not correct as you have an extra closing label tag (</label>).

1 Like

@lasjorg I guess they are already told to do what should be done, so I had just mentioned the solution to help them understand their mistakes!

@pkusaha We do not allow for posting solutions. It doesn’t help people learn. Also, if someone knows what to do, they do not need the solution.

Please just don’t post solutions, if you do post code, make it example code that can not just be copy-pasted.

1 Like

@lasjorg Ok got it and I did not know that

Hi , I went to the help and it didn’t show me the correct way, or I’m miss understanding. Thank you