I need help it saids im not doing it right when i did it right help

I pretty sure i got everything right but it saids i need two page for radio i have that already and Your radio buttons should be given the name attribute of indoor-outdoor .

Each of your two radio button elements should be nested in its own label element.
i did all of those can you guys help me

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36.

Challenge: Create a Set of Radio Buttons

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

You’re missing a > after </button

2 Likes

I had the same issue too :).

I think it is because your input tag is not nested inside your label tag. For some reason, you need to add a label tag to each of the input tags not before or after the input tags. It will look like this.

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

Does it make sense?

EDIT: and also as @kevcomedia said, the text at the end is missing. INDOOR

I take it back. After looking at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label. You are doing it right. It is just the text that is missing.

1 Like

Yeah i fix it i was missing the text but thank you for your help

1 Like