CSS outline-style PropertyS2C Home « CSS outline-style Property


The CSS outline-style specifies the outline style for an element.

Applies To

All elements.

Property Values

outline-style - Defines a style for the outline.

Valid values for outline-style keywords are none, dotted, dashed, double, groove, inset, outset, ridge and solid.

inherit - The outline-style properties are inherited from the parent element.

Default Value

Default value of outline-style is none.


The outline-style property is NOT inherited from the parent element unless specified using the inherit property value.

Browser Anomalies

IE5, IE6 and IE7 do not support the inherit property value.
IE8 does with a valid !DOCTYPE.
IE9+ supports the inherit property value.

The look of the different outline styles varies greatly from browser to browser.


<!DOCTYPE html> 
<!-- Our HTML/CSS for the CSS outline-style property follows -->
<html  lang="en">
<title>CSS Reference - CSS outline-style Property</title>

<!-- Valid values for CSS outline-style Property are:
	border-style (none, dotted, dashed, double, 
	groove, inset, outset, ridge  and solid) and inherit. 

<style type="text/css">
/* Set a border and padding around images to see the 
   effects of changing the outline styles */
img {
	padding: 10px;
	border: 6px solid yellow;
	outline: 4px solid red;
/* Outline set to inset */
#img1 {
	outline-style: inset;
/* Outline set to groove */ 
#img2 {
	outline-style: groove;

<h1>Looking at the CSS outline-style Property</h1>
<p>Outline style of inset.
<img id="img1" src="https://server2client.com/images/shepherdspiesmall.jpg"
    alt="Shepherds Pie">
<p>Outline style of groove.
<img id="img2" src="https://server2client.com/images/shepherdspiesmall.jpg"
    alt="Shepherds Pie">

How It Looks

The results of using the outline-style property with the values above will look something like the following:


go to home page Homepage go to top of page Top