Web development

HTML title Attribute

Learn how to use the HTML title Attribute.

HTML title Attribute

The HTML title attribute defines extra information about an element (can be used on all HTML elements).

The information is often displayed as a tooltip text when the cursor hovers over the element.


<element title="text"> 

text – a tooltip text for an element.


<!DOCTYPE html>

<p title="Leran HTML, CSS and JavaScript"></p>



Hover over the text:

Enjoy coding!

Read also:

HTML class Attribute

HTML data-* Attribute

CSS Tooltips