Atributo HTML tabindex
Exemplo
Links com uma ordem de tabulação especificada:
<a href="https://www.w3schools.com/" tabindex="2">W3Schools</a>
<a href="http://www.google.com/" tabindex="1">Google</a>
<a href="http://www.microsoft.com/" tabindex="3">Microsoft</a>
Definição e uso
O tabindex
atributo especifica a ordem de tabulação de um elemento (quando o botão "tab" é usado para navegar).
O tabindex
atributo pode ser usado em qualquer elemento HTML (vai validar em qualquer elemento HTML. No entanto, não é necessariamente útil).
Suporte ao navegador
Attribute | |||||
---|---|---|---|---|---|
tabindex | Yes | Yes | Yes | Yes | Yes |
Sintaxe
<element tabindex="number">
Valores de atributo
Value | Description |
---|---|
number | Specifies the tabbing order of the element (1 is first) |
Páginas relacionadas
Tutorial HTML: Atributos HTML
Referência HTML DOM: propriedade HTML DOM tabIndex