CSS outline-color Property


The outline-color CSS property is used to specify the color of the outline that is applied to an element when it gains focus, typically through keyboard navigation or when clicked. Outlines are essential for ensuring accessibility, as they provide a visible indication of which element is currently focused, aiding users who rely on keyboard navigation or screen readers. By setting the outline-color, web developers can customize the color of this focus indicator to match their design while maintaining accessibility standards.

Initial value
Applies to
All elements
Computed value
The computed value for 'invert is invert'. For [color] values, the computed value is as defined for the 'color' property
JavaScript syntax

Interactive Demo

The rusty swing set creaked a lonely lullaby in the twilight, shadows lengthening like grasping fingers across the dew-kissed grass. A lone dandelion seed, adrift on the breeze, whispered secrets of faraway fields, of dandelion suns and galaxies spun from fluff.


outline-color: <color> | invert | inherit


  • <color>Specify the color to use on all outlines. This can be anywhere from one to four values representing the top, right, bottom, and left outline respectively.
  • invertThis is expected to perform a color inversion on the pixels on the screen.
  • inherit


<div class="block">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div> 
.block { 
   outline-style: dotted; 
   outline-width: 3px; 
   outline-color: blue;
   padding: 10px; 

Browser Support

The following table will show you the current browser support for the CSS outline-color property.

Edge Chrome Firefox Opera Safari
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview

Last updated by CSSPortal on: 2nd January 2024