I NEED HELP WITH THIS CHALLENGE - Use the value attribute with Radio Buttons and Checkboxes

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">

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

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

<label><input type="checkbox" name="personality" value="Loving"> Loving
<label><input type="checkbox" name="personality" value="Lazy"> Lazy
<label><input type="checkbox" name="personality" value="Energetic"> Energetic
<input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36.

Challenge: Use the value attribute with Radio Buttons and Checkboxes

Link to the challenge:

see the bold part:

Give each of the radio and checkbox inputs the value attribute. Use the input label text, in lowercase, as the value for the attribute.


Welcome to the freeCodeCamp forums!

A good way to get a hint if you’re stuck is to see what the tests are asking for. In this case, the tests are asking for

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

If you’re still stuck, it’s good to re-read the prompt and look at the examples provided. They usually provide hints or in this case outright give you the solution.

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

This input element has the attributes id, value, type and name. Now that you know how to give an element a value attribute, you just need to give each element the appropriate one. Good luck!

1 Like


Please do not make duplicate replies. :slight_smile: