The outline property is a shorthand property for setting one or more of the individual outline properties outline-style, outline-width and outline-color in a single rule. In most cases the use of this shortcut is preferable and more convenient.

  • Initial valueBased on individual properties
  • Applies toAll elements
  • InheritedNo
  • MediaVisual
  • Computed valueSee individual properties
  • AnimatableNo
  • CSS VersionCSS2, CSS3
  • JavaScript syntaxobject.style.outline
Formal syntax: [ <outline-color> || <outline-style> || <outline-width> ] | inherit 

outline: red solid thick;
outline: #3366FF solid thick;
outline: #CCC solid 3px;
  • <outline-color>See the outline-color CSS property for values.
  • <outline-style>See the outline-style CSS property for values.
  • <outline-width>See the outline-width CSS property for values.
  • inherit
.class {
   outline: red solid thick;
}
1.5+Firefox8+Explorer1+Chrome1+Safari8+Opera


Last updated on 23rd March 2014 By Rene Spronk

View All CSS Properties

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.