# Tab Order

> The order the Tab key moves through the controls on a page.

**Field:** Design  
**Category:** Accessibility  
**Also known as:** Focus Order, Tabindex, Keyboard Order

## Think of it like

It is like a line of kids waiting for a slide. Each one goes in turn, front to back.

## Definition

Tab order is the order in which the Tab key moves from one control to the next. It should follow the order people read the page, from top to bottom. By default it follows the order in the code. If the code and the screen are in a different order, the focus jumps around and people get lost. A tabindex number above 0 forces an order, and that most often makes it worse.

## Example

In a form, Tab jumps from Name to the footer and back to Email. The fields were placed out of order in the code.

## Example code

```html
<div tabindex="0">Can be reached with Tab</div>
<div tabindex="-1">Only reachable by script</div>
```

0 puts a part in the normal order. Avoid numbers above 0; they jump the queue.

## Why it matters

A jumbled order makes a simple form feel like a maze for keyboard users.

## Common mistake

Fixing a jumbled order with tabindex numbers. Fix the order in the code instead.

## Three principles

- **Follows reading order.** Top to bottom.
- **Comes from the code.** Keep code in order.
- **No positive tabindex.** It makes things worse.

## Related terms

- [Keyboard Navigation](https://learn.benibix.com/term/design/keyboard-navigation)
- [Focus Indicator](https://learn.benibix.com/term/design/focus-indicator)
- [Focus Trap](https://learn.benibix.com/term/design/focus-trap)

![A form with five controls, numbered 1 to 5 in reading order: name, email, a check box, Cancel and Send. Arrows show the Tab key moving from one to the next.](https://learn.benibix.com/diagrams/tab-order.svg)

---

Source: https://learn.benibix.com/term/design/tab-order
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
