How do i attribute value to my checkboxs

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

  **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="loving"> Loving</label>
  <label for="lazy"><input id="lazy" type="checkbox" name="lazy"> Lazy</label>
  <label for="energetic"><input id="energetic" type="checkbox" name="energetic"> 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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36

Challenge: Use the value attribute with Radio Buttons and Checkboxes

Link to the challenge:

Hello @utoda,

checkbox are a type of input.
radio are also a type of input.

input is the tag:

<input .../>

refer to the input type=“radio” and see how a value attribute is being added to the radio
now do the same for the input type=“checkbox”

Here are a few links to see a full list of attributes that can be used within a input tag, where the most important attribute is the type attribute:

https://www.w3schools.com/tags/tag_input.asp

Hope that helps out

You have duplicate radio buttons, the tests only require one. Remove one of them (Be sure to check what you are deleting because one of the radio button group has the value attribute, and one does not). Next, none of your checkboxes have the value attribute. Like you have given the name, id and type attributes, you have the value attributes too. Give the checkboxes a value attribute with given text from the challenge panel

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