Dofactory.com
Dofactory.com

HTML <a> title Attribute

The title attribute on an <a> tag adds a tooltip with title text to the anchor tag.

Hovering the mouse over the link will display the tooltip.

Example

#

A title attribute on an <a> tag.
Hover over the link to see the tooltip.

<a title="Click to visit the Microsoft website" target="_blank" 
   href="https://microsoft.com">Microsoft</a>

Code explanation

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

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


Using title

The title attributes attaches additional information to the <a> element.

The title value displays as a tooltip.

A tooltip will appear when the link is hovered.


Syntax

<a 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 <a>

Author: Jack Poorte
Published: Jun 20 2021
Last Reviewed: Sep 30 2023


What's your favorite/least favorite part of Dofactory?


Guides