# outline-style

> The `outline-style` CSS property sets the style of an element's outline.

## Why is my CSS outline not showing?

The property that defines the style of an element's outline. It can be set to values like 'solid', 'dashed', 'dotted' or 'none', specifying how the outline line should appear, which helps in highlighting or decorating elements.

- Topic: Borders, Outlines & Shadows
- Type: property
- Browser support: Chrome 1+, Chrome Android 18+, Edge 12+, Firefox 1.5+, Firefox Android 4+, Safari 1.2+, Safari iOS 1+

## Example

Wrong:

```css
a:focus-visible {
  outline-width: 2px;
  outline-color: blue;
}
```

Right:

```css
a:focus-visible {
  outline-width: 2px;
  outline-style: solid;
  outline-color: blue;
}
```

The default `outline-style` is 'none', so width and color alone draw nothing.

## Common mistakes

- The outline doesn't appear because `outline-style` defaults to 'none'.
- Using 'hidden', which `outline-style` doesn't accept.

## Key points

- Outlines set with longhands also set `outline-style`.
- Focus styles use 'solid' or 'auto', not 'none'.

## Interview questions

### What does outline-style: auto do?

It lets the browser draw its own native focus ring, often in the platform's accent color.

### What is the default outline-style?

'none', so no outline is drawn until a style is set, except the browser's own focus ring on focus.

### Can outline-style be different on each side?

No. Unlike `border-style`, an outline uses one style all around.

## Related cards

- [outline](https://wonderium.dev/css/outline.md)
- [border-style](https://wonderium.dev/css/border-style.md)
- [:focus-visible](https://wonderium.dev/css/focus-visible.md)
- [outline-color](https://wonderium.dev/css/outline-color.md)
- [Focus Appearance](https://wonderium.dev/a11y/focus-appearance.md)

---

- Level: [CSS](https://wonderium.dev/css.md)
- HTML version: https://wonderium.dev/css/outline-style
- Last updated: 2026-11-25
