The title attribute on a <label> tag adds a tooltip with title text to the label.
Hovering the mouse over the label will display the tooltip.
A title attribute on a <label> element.
Hover over the label to see the tooltip. Then click the label and the textfield receives focus.
<form>
<label for="firstname" title="Customer's First name">First name</label><br />
<input type="text" id="firstname" name="firstname">
</form>
The title attributes provides additional information about the <label> element.
The title value displays as a tooltip.
Tooltips are shown when the label element is hovered.
<label title="value">
Value | Description |
---|---|
value | A string value. A title can span multiple lines by including newline or carriage-return characters: or 
. |
Here is when title support started for each browser:
Chrome
|
1.0 | Sep 2008 |
Firefox
|
1.0 | Sep 2002 |
IE/Edge
|
1.0 | Aug 1995 |
Opera
|
1.0 | Jan 2006 |
Safari
|
1.0 | Jan 2003 |
Back to <label>