Radio buttons and checkboxes what is wrong

**What is wrong with this code ?

  **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://www.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="https://www.freecatphotoapp.com/submit-cat-photo">
  <label for="indoor"><input id="indoor" type="radio" name="indoor-outdoor"> Indoor</label>
  <label for="outdoor"><input id="outdoor" type="radio" name="indoor-outdoor"> Outdoor</label><br>
  <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>
      <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>


</form>
</main>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0.

Challenge: Use the value attribute with Radio Buttons and Checkboxes

Link to the challenge:

Hello, as per the messages on the bottom of the challenge, all your radio button input elements should have a value attribute. At the moment none of your radio buttons have the value attribute.

Don’t understand one has the value “indoor” and one has the value “outdoor”

@MatchaCrisp is right you have id attribute with value indoor and outdoor but you have to have atribute value=“indoor” :slight_smile:

For example:

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

I think the value attribute is case-sensitive. Change it to all lowercase instead of uppercase Value .

Did that, still gives the solution as wrong.?

I just gave an example. You should give value attribute to every button accordingly. So, you have value=“indoor” in Indoor button. Now you should give value=“outdoor” in Outdoor button, value=“loving” in Loving button and for Lazy button lazy value and for Energetic, energetic value (for value attribute of course :slight_smile: )

1 Like

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