ATTRIBUTE:  tabindex

tabindex="number"
 
The tabindex attribute specifies an integer that defines the rank in the tabbing order for the specified element when you use the keyboard to navigate (tab through) a page.
 
The lower the integer, the higher the ranking in the tabbing order. A higher rank is tabbed to before a lower rank. The integer cannot be negative or zero.
 
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="eng">
<head>
<title>DevGuru XHTML tabindex Attribute Example</title>
</head>
<body>
<form>
Place the cursor in the top input window.
<br />
Then type the <b>tab</b> button on the keyboard.
<br />
Note that after the "First Name" we jump over "Last Name" to "Maiden Name".
<br />
After "Maiden Name" we return up to "Last Name".
<br />
<hr />
<br />
First Name: (tabindex = 1)
<br />
<input type="text" name="firstlname" size="30" tabindex="1" />
<br />
Last Name: (tabindex = 3)
</br>
<input type="text" name="lastname" size="30" tabindex="3" />
<br />
Maiden Name: (tabindex = 2)
<br />
<input type="text" name="maidenname" size="30" tabindex="2" />
</form>
</body>
</html>

 
Output:
Click to see and test output in separate window


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information