Content · Web Development · HTML

HTML Keyboard Tab Order with Native HTML Controls

Keyboard Tab Order with Native HTML Controls: Normal Tab order follows the document order for native controls; people can move backward with Shift+Tab. Includes a practical HTML example and an explanation.

1 views Published Oct 19, 2026 Updated Oct 19, 2026 Admin

A webpage should make sense even when someone cannot see its colors, pictures, or layout.

What You Need to Know


Browsers already know how to move through links and controls. Keep the source order close to the intended reading order so Tab leads people naturally through the task.

Try the Example


Take a look at the example. We’ll explain the important lines right below it.

<a href="/home">Home</a>
<button type="button">Open preferences</button>
<label for="display-name">Display name</label>
<input id="display-name" name="display-name">
<a href="/help">Help</a>

Let’s Read the Code


  • <button>: The button offers an action; its type or command determines what happens.
  • <label>: The label tells people what the input is for. A matching for/id pair makes the label clickable.
  • href: Href is the URL to a related resource or destination.
  • type: Type changes what sort of control or resource the browser uses.

What the example shows: Normal Tab order follows the document order for native controls; people can move backward with Shift+Tab.

What Happens in the Browser?


Try this with Tab and Shift+Tab. If you can, inspect the accessibility tree too; appearance alone does not tell the whole story.

A quick keyboard check: Press Tab to move forward, Shift+Tab to go back, and Enter or Space to activate controls when appropriate. Watch where focus goes. If you cannot tell which control is active, the interface needs improvement.

Your Turn


Move through the example without a mouse. Read each control name and current state aloud as if describing it to a friend.

Common Beginner Mistakes


  • Judging the page only by how it looks, without checking its meaning and keyboard behavior.
  • Avoid positive tabindex numbers: they can create a focus sequence that is harder to predict.

Key Takeaways


  • Browsers already know how to move through links and controls.
  • <button>: The button offers an action; its type or command determines what happens.
  • A meaningful HTML element is usually a stronger starting point than adding an ARIA role to a generic div. Also check what happens using only the keyboard.
Share this resourceSend this page to someone who may find it useful.