Each of your two radio button elements should be nested in its own label element. hello i've done everything well but this one isn't working,what should i do?

Tell us what’s happening:

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 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>
	
</form>
</main>

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Raspbian Chromium/78.0.3904.108 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

Hello @Edmonanto, this line

<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> should be nested inside <label>

Hint:

<label>
     <input>
</label>

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

Thank you for understanding.

2 Likes

Sorry about the spoiler solution, I kinder edited a bit. So do I still leave it as spoiler?

Something like that doesn’t need spoiler tags (doesn’t hurt though). Thanks for helping out!

hello i’ve one issue in here

as it is a different challenge, it is better to use the “Ask for help” button and open a different topic. Also, please, post your code, not a screenshot. The Ask for help button prepare a post for you, you just need to ask your question in “Tell us what’s happening” part.

I would just say, read again instructions. Pay attention to details. That’s really important.
As it is a screenshot I am not able to quote your code, to point out the part that needs improvements.