Basic HTML and HTML5 - Use the value attribute with Radio Buttons and Checkboxes

Tell us what’s happening:
Describe your issue in detail here.
my code isn’t running
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><input id="indoor" value="indoor" type="radio" name="indoor-outdoor"> indoor</label>
    <label for><input id="outdoor" value="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>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Basic HTML and HTML5 - Use the value attribute with Radio Buttons and Checkboxes

Link to the challenge:

1 Like

Welcome to our community!

The instruction: " Give each of the existing radio and checkbox inputs the value attribute. Do not create any new radio or checkbox elements. Use the input label text, in lowercase, as the value for the attribute."

You have posted the given code in this challenge without any attempt to solve it.

This code line shows exactly what you have to do. In this input element you have the value="indoor" already set. The value is the same as input’s id value. The ‘value’ attribute should be found in each of the input elements, set to the same value as its corresponding input’s id.

Thank you, I’ve noticed my mistake

1 Like

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