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

Last updated on 2 August 2018 By Rene Spronk

View All HTML Tags

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.