Please help.. not sure what I'm doing wrong

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 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15.

Challenge: Create a Set of Radio Buttons

Link to the challenge:

Currently, your input elements are not nested in label elements. You need to fix that per the instructions.

1 Like

Hey @sleepingoncoding, Welcome to the community :slight_smile:

As correctly @RandellDawson said you need to move your input elements into the labels,
think about labels as wrappers for your input, so instead of doing in this way as you did:

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

You should do something like this:

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

Does it make sense? Please let me know if it doesn’t and we can have a further discussion about it.

Happy Coding :man_technologist:

1 Like

@lucatardi thank you! is there anyway you could refer me to a page for the lingo of the code… i can understand the concept but its like being thrown into a language u know nothing about and then trying to decipher what “elements” are or “attributes” thats what I’m getting hung up on. if that even makes sense lol…

also my labels where closed off in the wrong places right? because i just redid the whole thing and passed the challenge.
anyway thank you!