HTML tabindex attribute
Examples
Links with the specified tab key navigation order:
<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>
<a href="http://www.google.com/" tabindex="1">Google</a><br />
<a href="http://www.microsoft.com/" tabindex="3">Microsoft</a>
try it"
Browser Support
All major browsers support the tabindex attribute
Definition and Usage
tabindex attribute specifies when using the "tab" key to navigate the element order.
Differences between HTML 4.01 and HTML5
In HTML5, tabindex attribute can be used with any HTML element (it will verify that any HTML element, but not necessarily useful).
In HTML 4.01, tabindex attribute can be used: <a>, <area>, <button>, <input>, <object>, <select>, and <textarea>.
grammar
<elementtabindex="number">
Property Value
值 | 描述 |
---|---|
number | 规定元素的 tab 键控制顺序(1 是第一)。 |
HTML Global Attributes