HTML DOM Element title attribute
- Kudancin textContent
- Bugu da ɗaya accessKey
- Taimakawa kiyuwar HTML DOM Elements ɗanar
Definition and usage
title
The attribute sets or returns the value of the element's title attribute.
title
The attribute can specify additional information about the element. When the mouse is moved over the element, it can be displayed as tooltip text.
See also:
Instance
Example 1
Get the element's title:
let title = element.title;
Example 2
Change the element's title:
element.title = "The World's Largest Web Development Site";
Syntax
Return the title attribute:
element.title
Set the title attribute:
element.title = text
Attribute value
Value | Description |
---|---|
text | The value of the title attribute of the element. |
Return value
Type | Description |
---|---|
String | The value of the title attribute of the element. |
Browser support
All browsers support element.title
:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Dukiya | Dukiya | Dukiya | Dukiya | Dukiya | Dukiya |
- Kudancin textContent
- Bugu da ɗaya accessKey
- Taimakawa kiyuwar HTML DOM Elements ɗanar