Create a Set of Radio Buttons (Problem)

I am trying to create a set of radio buttons and I do believe the code is right. Can someone help me out and let me know what I am doing wrong? Thanks in advance

  <form action="/submit-cat-photo">
<input id="indoor" type="radio" name="indoor-outdoor">
<label for="indoor">Indoor</label>
<input id="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_12_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.1 Safari/605.1.15.

What do the failing tests say?

Thanks for your input. I managed to get sorted. The task to misguide me. Turns out the input att should be nested with the label tag and not the other way around. Thanks again.

I 'm having similar problem here. I keep getting the below problems.

  1. Each of your two radio button elements should be nested in its own label element.
    2, Make sure each of your label elements has a closing tag.

<form action="/submit-cat-photo">

<Label for =“Indoor”><input id=“Indoor” type=“radio” name=“indoor-outdoor”>Indoor</Label>

<Label for=“Outdoor”><input id=“Outdoor” type=“radio” name=“indoor-outdoor”>Outdoor</Lable>

<input type=“text” placeholder=“cat photo URL” required>

<button type=“submit”>Submit</button>

</form>

</main>

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

you should nest the input inside the label not the other way.

1 Like

Hi you have to nest input in label.

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