HTML tabindex attribute

Definition and Usage

tabindex The attribute specifies the tab order of the element (when navigating using the "tab" key).

tabindex The attribute can be used for any HTML element (it will validate any HTML element, but it may not be useful).

See also:

HTML Tutorial:HTML Attributes

HTML DOM Reference Manual:HTML DOM tabIndex attribute

Example

Links with specified tab key order:

<a href="https://www.codew3c.com/" tabindex="2">W3School</a>
<a href="http://www.google.com/" tabindex="1">Google</a>
<a href="http://www.microsoft.com/" tabindex="3">Microsoft</a>

Try It Yourself

Syntax

<element tabindex="number">

Attribute Value

Value Description
number Specify the tab key control order of the element (1 is the first).

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support