HTML <label> Tag


The <label> tag is used for adding a label to a form control.

If you use the <label> tag, in some browsers, users can select a radio button or checkbox option by clicking on its label.

Example Code:
  <label for="male">Male</label>
  <input type="radio" name="sex" id="male" />
  <label for="female">Female</label>
  <input type="radio" name="sex" id="female" />

Attribute Definition
for Specifies the input control that this label is for. This value must be the same as the value in the input control's "id" attribute.
Global Attributes:

The <label> tag also supports the Global Attributes in HTML5

Event Attributes:

The <label> tag also supports the Event Attributes in HTML5