Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите сделать эту работу!
Вы можете также прочитать эту статью на English (US).
The HTMLElement.title
property represents the title of the element: the text usually displayed in a 'tooltip' popup when the mouse is over the node.
Syntax
var str = element.title; element.title = str;
Example
const link = document.createElement('a'); link.innerText = 'grapes'; link.href = 'https://en.wikipedia.org/wiki/Grape'; link.title = 'Wikipedia page on grapes';
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'title' in that specification. |
Living Standard | No change from Document Object Model (DOM) Level 2 HTML Specification. |
Document Object Model (DOM) Level 2 HTML Specification The definition of 'title' in that specification. |
Obsolete | No change from Document Object Model (DOM) Level 1 Specification. |
Document Object Model (DOM) Level 1 Specification The definition of 'title' in that specification. |
Obsolete | Initial definition. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Basic support | Chrome ? | Edge Full support Yes | Firefox Full support 1 | IE ? | Opera ? | Safari ? | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support 4 | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown
See also
- The HTML title global attribute.
Метки документа и участники
Метки:
Внесли вклад в эту страницу:
Tigt,
mfluehr,
fscholz,
NemoNobobyPersonne,
erikadoyle,
Jeremie,
teoli,
bjb568,
OWaz,
ajaybhat,
kscarfone,
Sheppy,
Matej Lednar,
RodMcGuire
Обновлялась последний раз:
Tigt,