HTML title Attribute

 

Definition and Usage

The title attribute is a global attribute. It specifies extra information as a tooltip about an element.

Value of the title attribute shown, when the mouse cursor hovers over the element’s content.

Note :

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

Example :

<h3 title="WebPlover HTML Tutorial">WP HTML</h3>
 
<a href="https://www.webplover.com" title="WebPlover Home Page">WebPlover</a>
Result

WP HTML

WebPlover

 

Example Explaining :

In the above example we have used the title attribute in the <h3> and <a> tags.

In the <h3> tag, value of the title attribute is “WebPlover HTML Tutorial“, therefore when the mouse cursor will hover over the WP HTML heading, a small bubble will appear with the text WebPlover HTML Tutorial.

Similarly in the <a> tag, value of the title attribute is “WebPlover Home Page“, therefore when the mouse cursor will hover over the WebPlover link, a small bubble will appear with the text WebPlover Home Page.

 

Here are a few tutorials for you to read next:

If you find this tutorial helpful, then please Subscribe to our YouTube Channel for video tutorials, and share this article on social media.

Was this post helpful?
Let us know if you liked the post. That’s the only way we can improve.
Yes0
No0
Powered by Helpful

Leave a Comment

Your email address will not be published. Required fields are marked *