Attributes with Radio buttons and checkboxes

Tell us what’s happening:
Describe your issue in detail here.

  **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>
<form action="">
  <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="loving" type="checkbox" name="personality"> Loving</label>
  <label for="lazy"><input id="lazy" type="checkbox" name="personality"> Lazy</label>
  <label for="energetic"><input id="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/93.0.4577.63 Safari/537.36

Challenge: Use the value attribute with Radio Buttons and Checkboxes

Link to the challenge:

What exactly is your issue? Please describe your problem. Have you made an attempt at this challenge?

yeah, but they are saying to use attributes loving, lazy, and energetic which is used but still.

From the code I see above, you have correctly added the value attributes to your radio boxes but you don’t seem to have added them for the checkbox inputs. You need to add the value to all radio and checkbox inputs. Just do the same for the checkbox as you did for the radios

pls, elaborate. I didn’t get it.

In the code above you correctly added the value attributes to the radio inputs. Why are the checkbox inputs different? Use your own example and do the same for the checkboxes as you did for the radio.
I do not understand why you are able to add the value to the radio inputs but not do the same to the checkbox inputs

Thanks, bro. It really helped.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.