English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
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.
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
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 ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the title attribute
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.
In HTML 4.01In HTML, the title attribute cannot be used with <base>, <head>, <html>, <meta>, <param>, <script>, <style> and <title>.
<element title="text">
Value | Description |
---|---|
text | The tooltip text (tooltip text) for the specified element. |