Trying to figure this one out and can't seem to get it. any suggestions?

Tell us what’s happening:

Your code so far

 <p>Click here to view more <a href="#">cat photos</a>.</p>
 <a href="#"><img src="" alt="A cute orange cat lying on its back."></a>
 <p>Things cats love:</p>
   <li>cat nip</li>
   <li>laser pointers</li>
 <p>Top 3 things cats hate:</p>
   <li>flea treatment</li>
   <li>other cats</li>
 <label for="indoor">
<input id= "indoor" value="indoor" type= "radio" name="indoor-outdoor">Indoor
<label for="outdoor"> 
 <input id="outdoor" value="outdoor" type="radio" name="indoor-outdoor">Outdoor 
<label for="loving"> 
 <input id="indoor" value="indoor" type="checkbox" name="indoor-outdoor">loving 
<label for="outdoor"> 
 <input id="outdoor" value="outdoor" type="radio" name="indoor-outdoor">Outdoor 
   <input type="text" placeholder="cat photo URL" required>
   <button type="submit">Submit</button>

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: Use the value attribute with Radio Buttons and Checkboxes

Link to the challenge:

looks like the value of the “for” attribute and the “id” for loving is not matching.

The details with the Xs on the bottom left of your screen can actually tell you a lot about what you need to do.

For example, it is asking for…

One of your radio buttons should have the value attribute of indoor .

You can surmise it should look something like this. value="indoor" When you compare it to the examples above. Now where can you put this information? If you again look at the examples above…

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

They’ve placed it in the input. So just do the same things over and over with the other inputs but with different values. :grinning: Lmk if you need more help. :blush:

1 Like

You must match the “id” and the “for” attribute. your “for” is not match in your “id” in your checkbox in “loving”

hello Cara! so i changed the id for loving and the for to loving as well but it is still telling me that one of my check boxes should have the value attribute for loving when I look at it it seems like it does. Sorry i’m an amateur :stuck_out_tongue:


Hey again! Key thing I would make sure is the code looks like below…

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

Where the only thing added is the value="indoor" and it matches the text in the label Indoor.

I would reset the code and just add value="outdoor", value="loving", value="lazy", value="energetic" in its corresponding places. Currently you have more things added than you should’ve in your code. Label should not equal anything and you have too many indoor-outdoor names. Leave the original values alone. Hope it helps!