outline

A shorthand property for setting the width, style, and color of an element's outline. Outlines are drawn outside the border edge and don't take up space.

Quick example

button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  /* accessible focus style that doesn't trigger layout shifts */
}

Quick facts

Initial value
See individual properties
Inherited
No
Applies to
all elements

Values

outline-widthoutline-styleoutline-color

outline Browser Support

Widely available Since 2023 94% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2023.

Safe to use without fallbacks.

94+
88+
16.4+
94+
ESC