Latest web development tutorials

HTML tabindex-Attribut

HTML Globale Attribute HTML Globale Attribute

Beispiele

Verbindungen mit dem angegebenen Tab-Taste Navigationsreihenfolge:

<a href="http://www.w3cschool.cc/" tabindex="2">W3CSchool</a><br />
<a href="http://www.google.com/" tabindex="1">Google</a><br />
<a href="http://www.microsoft.com/" tabindex="3">Microsoft</a>

Versuchen »

Browser-Unterstützung

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Alle gängigen Browser unterstützen das tabindex-Attribut


Definition und Verwendung

tabindex-Attribut gibt an, wann die "Tab" -Taste mit dem Element, um zu navigieren.


Die Unterschiede zwischen den HTML 4.01 und HTML5

In HTML5 kann tabindex-Attribut mit einem beliebigen HTML-Element verwendet werden (es wird sicherstellen, dass jede HTML-Element, aber nicht unbedingt sinnvoll).

In HTML 4.01 kann tabindex-Attribut verwendet werden: <a>, <area>, <button>, <input>, <object>, <select> und <textarea>.


Grammatik

<elementtabindex="number">

Eigenschaft Wert

描述
number 规定元素的 tab 键控制顺序(1 是第一)。


HTML Globale Attribute HTML Globale Attribute