HTML <label> Tag


The <label> HTML element establishes a connection between a certain label, which is usually the text, and a form element ( <input> , <select> , <textarea> ). Such a relationship is necessary in order to change the values ​​of form elements when the mouse clicks on the text. In addition, using <label> you can set keyboard shortcuts and switch to the active element like links.


Permitted Parents
Any element that accepts phrasing content
Inline and text
Start/End Tags
Start tag: required, End tag: required


<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

Browser Support

The following table will show you the current browser support for the HTML <label> tag.

Edge Chrome Firefox Opera Safari
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview

Last updated by CSSPortal on: 30th March 2024