With tab indexes, you can provide a way for users to navigate easily through form fields with a keyboard. You do this by specifying the tabbing order for each element in the form, which makes it possible to use the Tab key to move back and forth through form fields. In the following example, the tabbing order is set sequentially with the tabindex attribute. When the user presses Tab, the userName field will be accessed first, the userEmail field next, and so on. The tabbing order can include any number from 0 to 32,767.
Browsers use the numerical value to determine the next or previous field.
Form fields can also be assigned an access key. Access keys let you use keyboard shortcuts for quick access to a specific field in a form. For example, if you assigned the N key to the userName field in the previous example, you would be able to use this key to go directly to the field. The way access keys work depends on the operating system you are running. On Microsoft Windows systems, you typically press the Alt key in addition to the access key.