Atribut tabindex HTML


Contoh

Tautan dengan urutan tab tertentu:

<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>

Definisi dan Penggunaan

Atribut tabindexmenentukan urutan tab dari suatu elemen (ketika tombol "tab" digunakan untuk navigasi).

Atribut tabindexdapat digunakan pada elemen HTML apa pun (ini akan memvalidasi pada elemen HTML apa pun. Namun, itu belum tentu berguna).


Dukungan Peramban

Attribute
tabindex Yes Yes Yes Yes Yes

Sintaksis

<element tabindex="number">

Nilai Atribut

Value Description
number Specifies the tabbing order of the element (1 is first)

Halaman Terkait

Tutorial HTML: Atribut HTML

Referensi HTML DOM: HTML DOM tabIndex Property