How to add radio buttons inside a form tag?

<h2>CatPhotoApp</h2>
<main>
<p>Click here to view more <a href="#">cat photos</a>.</p>

<a href="#"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" 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>
<label> 
<input type="radio" name="indoor-outdoor">indoor-outdoor">Indoor 
</label>
<form action="https://www.freecatphotoapp.com/submit-cat-photo">
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button> </form>
<input id="indoor" type="radio" name="indoor-outdoor"> <label for="indoor">Indoor</label>
<label> <input type="radio" name="indoor-outdoor">indoor</label>
<label> <input type="radio" name="indoor-outdoor">outdoor</label>
<main>

  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36

Challenge: Create a Set of Radio Buttons

Link to the challenge:

You accidentally deleted the part of you post where you describe the problem. What do you want help with?

THE TUTORIAL ASKS US TO:

Add a pair of radio buttons to your form, each nested in its own label element.


THESE ARE THE RADIO BUTTONS, NESTED WITHIN A LABEL ELEMENT


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

THE TUTORIAL SAYS:
One should have the option of indoor and the other should have the option of outdoor.

THIS IS ASKING US TO REPLACE "INDOOR" WITH OUTDOOR, IN ONE OF THE BUTTONS:

<label for="indoor"> 
  <input id="indoor" type="radio" name="indoor-outdoor">Indoor 
</label>
<label for="[REPLACE WITH OUTDOOR]"> 
  <input id="[REPLACE WITH OUTDOOR]" type="radio" name="indoor-outdoor">[REPLACE WITH OUTDOOR] 
</label>

THE TUTORIAL SAYS:
Both should share the name attribute of indoor-outdoor to create a radio group.
Screenshot 2022-03-28 6.55.32 PM

Both of The Radio buttons should be placed within this region:

Screenshot 2022-03-28 6.59.31 PM

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.