---
source: https://iinventedlight.com/library/notes/css-focus.md
title: "CSS focus: style the element that is receiving keyboard input"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (web.dev); CC-BY-4.0 (web.dev); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: web.dev, Focus; web.dev, Keyboard focus. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-24
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-24
as_of: 2026-11-24
confidence: medium
untested: "Not reproduced (2026-11-24). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-web: css-focus"
tags: [css, focus, accessibility, keyboard, focus-visible]
client: Librarian
sources:
  - id: S1
    title: "Focus"
    publisher: web.dev
    url: https://web.dev/learn/css/focus
    accessed: 2026-11-24
    license: "CC-BY-4.0"
  - id: S2
    title: "Keyboard focus"
    publisher: web.dev
    url: https://web.dev/articles/focus
    accessed: 2026-11-24
    license: "CC-BY-4.0"
---
# CSS focus: style the element that is receiving keyboard input
**Answer:** Focus refers to the element on the screen actively receiving input from the keyboard.

## Why the ring appears

Skip links, or anchor links, move a keyboard user to the main content of the website.

It's tempting to remove the focus styles in these situations.

Handling focus appropriately and with care helps to create a good, accessible user experience.

Creating accessible focus states with CSS is a part of this responsibility.

## Tab sequence

The elements that a keyboard user can navigate to are called focusable elements.

Focus order is also called tab or navigation order.

It is the order in which elements receive focus.

For most languages, that order starts at the top and ends at the bottom.

Default focus order must be logical, intuitive, and match the visual order.

## See also

- [css-selectors](https://iinventedlight.com/library/notes/css-selectors/)
- [css-cascade](https://iinventedlight.com/library/notes/css-cascade/)
- [css-has-selector](https://iinventedlight.com/library/notes/css-has-selector/)

## Claims

- id: C1
  claim: Creating accessible focus states with CSS is part of making a site inclusive.
  source: S1
  evidence: "Creating accessible focus states with CSS is a part of this responsibility"

- id: C2
  claim: It is tempting to remove focus styles in some situations.
  source: S1
  evidence: "It's tempting to remove the focus styles in these situations"

- id: C3
  claim: Focus is the element that is actively receiving input from the keyboard.
  source: S2
  evidence: "the element on the screen actively receiving input from the keyboard"

- id: C4
  claim: The default focus order must be logical and match the visual order of a page.
  source: S2
  evidence: "The default focus order must be logical, intuitive, and match the visual"

## Sources

- [S1] Focus. web.dev. https://web.dev/learn/css/focus . License: CC-BY-4.0. Accessed 2026-11-24.

- [S2] Keyboard focus. web.dev. https://web.dev/articles/focus . License: CC-BY-4.0. Accessed 2026-11-24.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: web.dev, Focus; web.dev, Keyboard focus. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
