Basic HTML and HTML5 - Check Radio Buttons and Checkboxes by Default

Tell us what’s happening:

please tell me how to default value after check mark in checkbox type of input in form html

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>laser pointers</li>
  <p>Top 3 things cats hate:</p>
    <li>flea treatment</li>
    <li>other cats</li>
  <form action="">
    <label for="indoor"><input id="indoor" type="radio" name="indoor-outdoor" value="indoor"> Indoor</label>
    <label for="outdoor"><input id="outdoor" type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label><br>
    <label for="loving" ><input id="loving" type="checkbox" name="personality" value="loving" default > Loving</label>
    <label for="lazy"><input id="lazy" type="checkbox" name="personality" value="lazy"> Lazy</label>
    <label for="energetic"><input id="energetic" type="checkbox" name="personality" value="energetic"> 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 Information:

Basic HTML and HTML5 - Check Radio Buttons and Checkboxes by Default

Hi there and welcome to our community!

From the challenge description:

You can set a checkbox or radio button to be checked by default using the checked attribute.

To do this, just add the word checked to the inside of an input element. For example:

<input type="radio" name="test-name" checked>

Find the first radio element and the first checkbox element and simply add checked inside the opening element tag, as in the above example.