HTML DOM Element title Property

Get the title of an element

Definition and Usage

The title property sets or returns the value of an element's title attribute.

The title attribute specifies extra information about an element. It can be shown as a tooltip text when the mouse moves over the element.

Related Pages

The HTML title Attribute

Syntax

Return the title property:

element.title

Set the title property:

element.title = text

Property Value

Value Description
text The value for the element's title attribute.

Return Value

Type Description
StringThe value of the element's title attribute.

Browser Support

element.title is supported in all browsers:
Chrome IE Edge Firefox Safari Opera
Yes Yes Yes Yes Yes Yes