I need help on how to create a set of radio button on HTML

I am stuck on create a radio button. I have saw the video help option, followed the hint but the code won’t run. help me out guys

Your code so far

<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>
  <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="https://freecatphotoapp.com/submit-cat-photo">
<input id="indoor" type="radio" name="indoor-outdoor">
<label for="indoor">Indoor</label>
<input for="outdoor" type="radio" name="indoor-outdoor">
<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 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15.

Challenge: Create a Set of Radio Buttons

Link to the challenge:

Challenge demands you to next input type="radio" inside <label>
You should write similar as following for each of the radio button

<label><input type="radio" id="indoor">indoor</label>
Indoor Outdoor

thank you for your prompt response. however, the above are my code but yet it won’t run

1 Like

in your code you have the input element followed by the label element, instead the input element should be inside the label element


Hi Earlgambary,

I just completed that task yesterday. I had the same problem. Mukeshgurpude is right. The HTML tags must be nested correctly to pass the test.

To make the nesting easier to see, put the opening and closing tags of the Label on separate lines and put the label text on the line between them. The Input tag can be placed just in front of the text.

    <input> text
1 Like

wow :astonished: thank you for your help guys… I really appreciate all of it. I got it just now:


Hi please to meet you I’m new here