Ge the title of an <abbr> element:
The result of x will be:
More "Try it Yourself" examples below.
The title property sets or returns the value of the title attribute of an element.
The title attribute specifies extra information about an element.
The information is most often shown as a tooltip text when the mouse moves over the element.
Property | |||||
---|---|---|---|---|---|
title | Yes | Yes | Yes | Yes | Yes |
Return the title property:
Set the title property:
Value | Description |
---|---|
text | A tooltip text for an element |
Return Value: | A String, representing the title of the element |
---|
Change the title of a <p> element:
HTML reference: HTML title Attribute