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

HTML reference manual

HTML tag大全

HTML title attribute

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

Attributs globaux HTML

Some typical uses:
    Links: title or description of the linked document
    Media elements, such as images: descriptions 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 oldtoolbag.com)</title>
</head>
<body>
<p><abbr title="World Health Organization">WHO</abbr>/abbr> a été fondé en 1948.</p>
<p title="Tutoriel gratuit de base">oldtoolbag.com</p>
</body>
</html>
Voyons voir ‹/›

Compatibilité avec les navigateurs

IEFirefoxOperaChromeSafari

Tous les navigateurs populaires prennent en charge l'attribut title

Définition et utilisation

L'attribut title spécifie des informations supplémentaires sur l'élément.
Lorsque le curseur de la souris est placé sur un élément, cette information est généralement affichée sous forme de texte d'info-bulle.

HTML 4.01 et HTML5différences

Dans HTML5L'attribut title peut être utilisé sur n'importe quel élément HTML (il sera vérifié sur n'importe quel élément HTML. Mais cela n'est pas toujours utile).

Dans HTML 4.01Dans HTML, l'attribut title ne peut pas être utilisé avec les balises <base>, <head>, <html>, <meta>, <param>, <script>, <style> et <title>.

Syntaxe

<element title="text">

Valeur de l'attribut

ValeurDescription
textTexte d'info-bulle (tooltip text) de l'élément.
Attributs globaux HTML