English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Directory

HTML title attribute

The title global attribute includes text representing advisory information, and it is related to the element it belongs to. This information is usually present, but it is not necessary, and it is displayed to the user as a prompt.

HTML Global Attributes

Some typical uses:
    Links: Title or description of the linked document
    Media elements, such as images: Description or associated information
    Paragraphs: Footnotes or related comments
    References: Author information, and others

Online Example

Using the title attribute in HTML documents:

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML title attribute usage (Basic Tutorial Website</title>3codebox.com)</p>/title>
</head>
<body>
<p><abbr title="World Health Organization">WHO</abbr>/abbr> was founded in 1948.</p>
<p title="Free Basic Tutorial">oldtoolbag.com</p>
</body>
</html>
Test to see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the title attribute

Definition and Usage

The title attribute specifies additional information about the element.
The information is usually displayed as tooltip text when the mouse is moved over the element.

HTML 4.01 with HTML5differences

In HTML5The title attribute can be used on any HTML element (it will validate on any HTML element. However, it may not be useful).

In HTML 4.01In HTML, the title attribute cannot be used with <base>, <head>, <html>, <meta>, <param>, <script>, <style> and <title>.

Syntax

<element title="text">

Attribute value

ValueDescription
textThe tooltip text (tooltip text) for the specified element.
HTML Global Attributes