HTML Introduction | HTML Forms | HTML Label
The label Element
The label element helps users select input text fields, checkboxes, radio buttons, and similar form controls more easily.
When a user clicks a label, focus automatically moves to the related input text field. For checkboxes and radio buttons, the related control is selected automatically.
Write the form as shown below so that the for attribute of the label matches the id value of the form element.
<label for="html">HTML</label> <input type="checkbox" name="html" id="html">
<label for="css">CSS</label> <input type="checkbox" name="css" id="css">