I am not understanding it can someone help

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" name="indoor-outdoor"> Indoor</label>
   <label for="outdoor"><input type="Outdoor" name="indoor-outdoor"> Outdoor</label><br>
   <label><input type="checkbox" name="personality"> Loving</label>
   <label><input type="Lazy" name="personality"> Lazy</label>
   <label><input type="Energetic" name="personality"> 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 (Windows NT 6.1; ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36.

Challenge: Use the value attribute with Radio Buttons and Checkboxes

Link to the challenge:

what part do have problem understanding? please provide more details

iam not understanding this whole lesson

It is basic webpage with some html elements please tell me what is your problem in it.

Imagine that you have a form that has male and female options to save on the database.
If you don’t fill the attribute value inside of each “input” tag, you’ll never know which option was selected.
So, you must set value=“male” to the radio “male” and set the value=“female” to the radio “female”

The attribute “value” tells the server wich radio or checkbox was selected/checked.
If the value attribute is not set, when the user clicks on the submit button, the value will be just “On”.
The “On” value does not define wich radio or checkbox was pressed.

So, just type the values attributes:
(I am putting just the block of the form)
value=“indoor”
value=“outdoor”
value=“loving”
value=“lazy”
value=“energetic”

It will seem like this (note the attribute “value” in each input element):


  <form action="/submit-cat-photo">
    <label><input type="radio" value="indoor" name="indoor-outdoor"> Indoor</label>
    <label><input type="radio" value="outdoor" name="indoor-outdoor"> Outdoor</label><br>
    <label><input type="checkbox" value="loving" name="personality"> Loving</label>
    <label><input type="checkbox" value="lazy" name="personality"> Lazy</label>
    <label><input type="checkbox" value="energetic" name="personality"> Energetic</label
<br>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
1 Like