HTML | title Attribute
The title attribute is used to specify the extra information about the element. When the mouse moves over the element then it shows the information.
Syntax:
<element title = "text">
Attribute Value: This attribute contains single value text which is used as the tooltip text for an element. This title is associated with all HTML elements.
Example:
<!DOCTYPE html> <html> <head> <title>title attribute</title> <style> body { text-align:center; } h1 { color:green; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2>title attribute</h2> <abbr title="GeeksforGeeks: A computer science portal for geeks">GFG</abbr> <p title="GeeksforGeeks: A computer science portal for geeks">W3Schools.com</p> </body> </html> |
Output:

Supported Browsers: The browser supported by title attribute are listed below:
- Chrome
- Internet Explorer
- Firefox
- Safari
- Opera
Recommended Posts:
- HTML | title Tag
- How to get the title of an HTML page ?
- HTML | DOM Title Object
- HTML | DOM title Property
- HTML | DOM Title text Property
- How to add icon logo in title bar using HTML ?
- HTML | <map> name Attribute
- HTML | value Attribute
- HTML | <img> alt Attribute
- HTML | <li> value Attribute
- HTML | dir Attribute
- HTML | low Attribute
- HTML | for Attribute
- HTML | <img> src Attribute
- HTML | min Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



