Use the value attribute with radio buttons

Tell us what’s happening:

I seem to be confused as to why it keeps saying one of my checkboxes should have the value attribute of loving, lazy, and energetic. I know I’ve done outdoor and indoor correctly but I don’t understand why the bottom three are incorrect or what I’m doing wrong can someone help please?

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">
  <label><input type="radio" name="indoor-outdoor"> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
  <label><input type="checkbox" name="personality"> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Energetic</label><br>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>
<label for="indoor">
<input id="indoor" value="indoor" type="radio" name="indoor-outdoor">Indoor</label>
<label for="outdoor"> <input id="outdoor" value="outdoor" type="radio" name="indoor-outdoor">Outdoor</label>
<label for="loving"> <input id="loving" value="loving" type="radio" name="loving">Loving</label>
<label for="lazy"><input id="lazy" value="lazy" type="radio" name="lazy">Lazy</label>
<label for="energetic"><input id="energetic" value="energetic" type="radio"name="energetic">Energetic</label>    
</main>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.4 Safari/605.1.15.

Challenge: Use the value attribute with Radio Buttons and Checkboxes

Link to the challenge:

You have duplicated your checkboxes and radio buttons. I’d reset your code and add the value attributes to the preexisting checkboxes and radio buttons.

2 Likes