Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

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.

Example

#

A title attribute on three <li> elements.
Hover the list items to see the job descriptions.

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

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.


Syntax

<li title="value">

Values

#

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:

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

You may also like

 Back to <li>
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

Guides