HTML Form tags, Form, input (radio, checkbox) and select

3. Checkboxes

3.1. The checked attribute

          Upon loading of a webpage that has checkboxes and radio buttons, the default setting is no item is selected. If you want an item to be selected by default, you can use the checked attribute to indicate an item as selected by default.

          The code snippet below shows how to use the checked attribute.

 <input type="checkbox" id="option" name="option1" value="Option" checked>

 <label for="option1"> Cream Cheese</label><br>