HTMLElement: title-Eigenschaft

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

We'd love to hear more about your role and the company you work for
Please help us by answering a few questions.

Die HTMLElement.title-Eigenschaft repräsentiert den Titel des Elements: den Text, der normalerweise in einem 'Tooltip'-Popup angezeigt wird, wenn die Maus über dem Knoten schwebt.

Wert

Ein String.

Beispiele

js
const link = document.createElement("a");
link.innerText = "grapes";
link.href = "https://en.wikipedia.org/wiki/Grape";
link.title = "Wikipedia page on grapes";

Spezifikationen

Specification
HTML
# dom-title

Browser-Kompatibilität

Siehe auch

  • Das HTML title globale Attribut.