---
url: "https://web.dev/articles/style-focus"
titulek: "Style focus | web.dev"
h1: "Style focus Stay organized with collections Save and categorize content based on your preferences."
popis: "The focus indicator identifies the focused element. For users who can't or don't use a mouse, this indicator is extremely important, as it acts as a stand-in for their mouse-pointer."
jazyk: "en"
kanonicka: "https://web.dev/articles/style-focus"
drobecky: ["web.dev", "Resources"]
zdroj: "live"
wayback_snapshot: ""
stazeno: "2026-09-14 03:32:39"
znaku: 5247
slov: 862
kodovani: "iso-8859-2"
sha256: "4b63cbccf6c921dee44a375f19d50f129057c2ef3a0cee4aaa4a148222bf6cff"
---
Style focus
Stay organized with collections
Save and categorize content based on your preferences.
Rob Dodson
The focus indicator, often signified by a "focus ring," identifies the
element in focus on your page. For users who can't or don't want to use a mouse,
this indicator is *extremely important*, because it acts as a stand-in for a
mouse-pointer. If the browser's default focus indicator clashes with your design, you can use
CSS to restyle it. Remember to keep your users in mind. Use `:focus` to always show a focus indicator The [`:focus`](https://developer.mozilla.org/docs/Web/CSS/:focus)
pseudo-class is applied to elements in focus, regardless of the input method
or device (such as a mouse, keyboard, or stylus) in use. For example, the following `
` has a `tabindex` that makes it focusable,
with a custom style for its `:focus` state: `div[tabindex="0"]:focus { outline: 4px dashed orange; }` No matter what device you use, the `
` looks the same in focus. Unfortunately, browsers can be inconsistent with how they apply focus. Whether
or ot an element receives focus may depend on the browser and the operating
system. For example, the following `