Little Web Hut

CSS 2.1 Reference: outline-width Property

CSS outline-width Property
Syntax
selector {outline-width: value ;}
  • value is specified by using a length or one of the following keywords: thin, medium, thick, or inherit.
Usage

The outline-width property is used to specify the width of the outline. The outline property generates an outline around the content and border area of the element's box. See the Box Model for a description of the boxes that are generated for elements and the relative position of the content area and borders. Unlike the border property, the outline property is displayed on top of the element's box and it does not influence the size or position of the element's box.

This property is specified by using a length, or a keyword, according to the syntax shown above.


CSS Example: The outline-width properties are set using a length for the <h1> element and a keyword for the <h2> element.
h1 {outline-color: red;
    outline-style: solid;
    outline-width: 10px;
}
h2 {outline-color: red;
    outline-style: solid;
    outline-width: thick;
}
Test It HTML StyleTest It XHTML StyleTest It HTML5 Style

Keywords
  • thin
  • medium
  • thick
  • inherit - The inherit keyword is used to specify that the value for this property should be taken from the parent element. If inherit is used with the root element, then the initial value for this property will be used.
Applies To All elements
Inherited No
Initial Value medium


outline-width Property Examples
Test It HTML StyleTest It HTML StyleTest It HTML5 StyleThe outline-width properties are set using a length for the <h1> element and a keyword for the <h2> element.