I'm unable to create the checkboxes with value attributes of loving lazy and energetic do I need to create new labels again or can I just add them in existing labels

Tell us what’s happening:

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

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 10; SAMSUNG SM-G960U) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/11.2 Chrome/75.0.3770.143 Mobile Safari/537.36.

Challenge: Use the value attribute with Radio Buttons and Checkboxes

Link to the challenge:

you have changed the label text that was there at the start

1 Like

Ieahleen please what does the value in the above person’s code stands for. Is actually representing “for” id?

the value is the attribute determining what’s sent to the back-end when that button is selected and the form submitted

the id is a way to uniquely identify a specific element

1 Like

Thank you so much for your help your really good !!!