HTML global attribute title








The title attribute provides information about an element. It is commonly used by the browser to display tool tip information.

Syntax

<element title="text">

Attribute Values

text
tooltip text

Browser compatibility

title Yes Yes Yes Yes Yes

Example

<!DOCTYPE HTML>
<html>
<body>
    <a title="learn HTML and CSS" href="http://java2s.com">Visit  the  site</a>
</body>
</html>

Click to view the demo