HTML <li> title Attribute

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.

  • Designers
  • Developers
  • Managers
  <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>

Code explanation

The title attribute is placed in the <li> opening tag.

The value can be any string. Hover over the li and a tooltip appears.

Using title

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:  &#10;  or  &#013;.

Browser support

Here is when title support started for each browser:

1.0 Sep 2008
1.0 Sep 2002
1.0 Aug 1995
1.0 Jan 2006
1.0 Jan 2003

You may also like

 Back to <li>

Last updated on Sep 30, 2023