English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
tabindex global attribute indicates whether the element can be focused, and it/Where to participate in the keyboard navigation order (usually using the Tab key, hence the name).
Note: The maximum value of tabindex should not exceed 32767.If not specified, its default value is -1.
Link in specified tabindex order:
<!doctype html> <html> <head> <meta charset="UTF-8"> <title>HTML tabindex attribute usage (Basic Tutorial Website oldtoolbag.com)</title>/<title> </<head> <body> <div tabindex="1">oldtoolbag.com</div><br> <div tabindex="3">google.com</div><br> <div tabindex="2">microsoft.com</div> <script> // At start, set focus on the first div document.getElementsByTagName('div')[0].focus(); </script> <p tabindex="4<b>Note:</b>/Try navigating the elements by using the "Tab" button on your keyboard./p> </body> </html>Test see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the tabindex attribute
The tabindex attribute specifies the tab order of elements (when navigating using the 'tab' button).
In HTML 4.01In HTML, the tabindex attribute can be used with <a>, <area>, <button>, <input>, <object>, <select>, and <textarea>.
<element tabindex="number">
Value | Description |
---|---|
number | Specify the tab key control order for elements (1 is the first). |