Hi everyone im struggling with the adding valu attributes to the radio buttons, from what i can see im doing everything right apart from the add value to "indoor" radio button?

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="https://bit.ly/fcc-relaxing-cat" 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>
<form action="/submit-cat-photo">
  <label for="indoor"> <input value="indoor" type="radio" name="indoor-outdoor"> indoor</label> 
  <label for="outdoor"> <input value="outdoor" type="radio" name="indoor-outdoor"> Outdoor</label> <br>
  <label><input value="loving" type="checkbox" name="personality"> Loving</label>
  <label><input value="lazy" type="checkbox" name="personality"> Lazy</label>
  <label><input value="energetic" type="checkbox" name="personality"> Energetic</label><br>
  <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/83.0.4103.97 Safari/537.36.

Challenge: Use the value attribute with Radio Buttons and Checkboxes

Link to the challenge:

Hi @beddows89
Welcome to the freeCodeCamp forum!

You accidentally made the label text of the “indoor” label lowercase. That confuses the test. If you make it uppercase, your code passes.

hi michaelsndr, ive just tryed what you suggested but its still not allowing it ?

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

sorry yes, you were right haha (head in hands moment)

after name=“indoor-outdoor” give space and add
value= indoor>

but i didnt need to uppercase the letters and still passed

you have to add an id before adding value :

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

I was referring to this …


If I am not mistaken, using the ID and for attribute is an alternative technique, but since this was already wrapped in the label, not needed here.

2 valid ways:



yeah you are right.

just change the place of value and type and then see if it works.