I don't understand radio button challenge

Tell us what’s happening:
I’ve used the solutions in the forum and video and nothing seems to work. The examples in the challenge are not the same as the solutions in the video. They seem to be backwards. Like…
EXAMPLE FROM CHALLENGE:

indoor

EXAMPLE FROM VIDEO:

Indoor

I’m so confused!

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 for="indoor">
   <input id="indoor"type="radio"name="indoor-outdoor">indoor
   <input id="outdoor"type="radio"name="indoor-outdoor">outdoor
   </label>
  

  <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; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36.

Challenge: Create a Set of Radio Buttons

Link to the challenge:

Welcome to the forum @tabithaj777: :smiley: :smiley:

I ran your code: There’s one thing left to complete. Could you please check the code in the lesson: This code shows how the radio buttons has to be. :smiley: :smiley: :smiley: :smiley:

1 Like

you have the label for indoor but you put inside it both the indoor and outdoor radio buttons

remember, one label for one button

2 Likes

I realize my current code seems wack. I just got frustrated. I tried this new code and the error I got was “Each label element should have a closing tag.” Do I not have that?!

Thanks for the input you guys!


<label for= "indoor">

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

     </label>

    <label for="oudoor">

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

      </label>
1 Like

Thank you @leonardootc, I’ve tried the example in the lesson. It didn’t work either. In fact, the syntax is opposite from the example in the video. Neither seemed to work. I’ll try again. Thank you!

Hello @tabithaj777: Could you Paste all your Code? Please

Edit 1: You lose a “t” in your second label
Edit2: You have to have a Form tag above you first label tag and one close tag /form below you second /label tag