HTMLElement tabIndex Property
HTMLElement Object
Definition and Usage
The tabIndex property sets or returns the tab order for an element.
Syntax
HTMLElementObject.tabIndex=tabIndex
Browser Support

The tabIndex property is supported in all major browsers.
Example
Example
Change the tab order for three links:
<html>
<head>
<script>
function changeTabIndex()
{
document.getElementById('1').tabIndex="3"
document.getElementById('2').tabIndex="2"
document.getElementById('3').tabIndex="1"
}
</script>
</head>
<body>
<p><a id="1" href="http://www.w3schools.com">1</a></p>
<p><a id="2" href="http://www.w3schools.com">2</a></p>
<p><a id="3" href="http://www.w3schools.com">3</a></p>
<input type="button" onclick="changeTabIndex()"
value="Change TabIndex">
</body>
</html>
Try it yourself »
HTMLElement Object
Thank You For Helping Us!
Your message has been sent to W3Schools.
Close [X]