The HTML label tag defined caption for an element. It is typically used with HTML forms to provide a description for a form element.


  • If an element is associated with the label, you can click on the label to activate the element.
  • The label text is not only visually and programmatically associated with the corresponding element. This means that for example a screenreader will read out the label when the user is focused on the form input, making it easier to understand what data should be entered.


forSpecifies the input control that this label is for.
formSpecifies one or more forms the label belongs to

This element supports HTML Global attributes.


<!DOCTYPE html>
<h5>Checkbox with no label:</h5>
<span>Select me</span>
<input type="checkbox" name="cheese" id="chkboxsp">
<h5>Checkbox with label — Click the label to active the element:</h5>
<label for="chkboxlb">Select me</label>
<input type="checkbox" name="peas" id="chkboxlb">


Checkbox with no label:
Select me
Checkbox with label — Click the label to active the element: