Nesting buttons into labels

i’m a bit stuck , can anyone help please?

  **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://www.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="https://www.freecatphotoapp.com/submit-cat-photo">
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>
<button type="radio">indoor-outdoor</button>
<label for="indoor">
input id="indoor" type="radio" name="indoor-outdoor">Indoor</label>
<button type="radio">indoor-outdoor</button>
<label for="outdoor">
input id="outdoor" type="radio" name="indoor-outdoor">Outdoor</label>
</main>
  **Your browser information:**

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 13816.64.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.100 Safari/537.36.

Challenge: Create a Set of Radio Buttons

Link to the challenge:

Hi there,
First of all you added more than two buttons to you code, your code so far:

<button type="radio">indoor-outdoor</button>

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

<button type="radio">indoor-outdoor</button>

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

You need to add only two buttons.
Secondly, your buttons should be inside the form, Not outside of it.

And for ( labels) and id ( buttons) both have to have the name “indoor-outdoor

okay thank you , i got it .

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