This is an example of a title attribute on a <li> tag.
This attribute adds a tooltip with title text to the list item.
A title attribute on three <li> elements.
Hover the list items to see the job descriptions.
<ul>
<li title="Responsible for building the user interface of the website">Designers</li>
<li title="Writes and maintains the code of a website">Developers</li>
<li title="Manages the teams and makes sure that the timeline is on track">Managers</li>
</ul>
The title attribute is placed in the <li> opening tag.
The value can be any string. Hover over the li and a tooltip appears.
The title attributes provides additional information about the <li> element.
The title value displays as a tooltip.
Tooltips are shown when the li element is hovered.
<li 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 |