How do i create a Set of Radio Buttons

Tell us what’s happening:

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/create-a-set-of-radio-buttons/

Use the MDN documentation to learn about html elements and much more. Develop the habit to use it, it’s a valuable tool for all web developers.
About your specific case:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio

1 Like

Thanks. Helped but i am not getting the nesting of radio button elements in their labels

Nest one label in each list item <ul><li><label></label></li>.........</ul>

1 Like