In this section, we will learn what the title attribute is and how to use it in HTML.
What is title Attribute in HTML? (HTML Tooltip)
The title attribute, as the name suggests, is used to set a title for an HTML element.
The value we set for this attribute then will appear in a tooltip over or under the target element when the mouse cursor is over the box of that element.
HTML title Attribute Syntax
<element title = “value”>
HTML title Attribute Values
The value we set for the title attribute is a text content that we want to appear in a tooltip on the target element when a mouse is over it.
Example: HTML tooltip hover
See the Pen HTML tooltip hover by Omid Dehghan (@odchan1) on CodePen.