Extensible HyperText Markup Language

XHTML.com recommends: PSD to HTML Slicing Service

outline-style

Definition

The outline-style property specifies the line style of the element's outline. An outline is similar to a border except that it is rendered over the element's box model so it does not affect the width or height used by the element. One useful application of outline, seen below, is to show which form control currently has focus.

Screen shot of a Web browser showing 3 form control. One control has a dotted blue outline.

The following screen shot shows some outline styles rendered by a Web browser.Screen shot of a Web browser rendering various outline styles.

Example

  1. input:focus, select:focus, textarea:focus {
  2. outline-size: 2px;
  3. outline-style: dotted;
  4. outline-color: blue;
  5. }

Characteristics

Possible values

The following values are possible for the line style of an element's outline:

none
No outline.
hidden
As for none, the result is no outline.
dotted
The outline is a series of dots.
dashed
The outline is a series of short line segments.
solid
The outline is a single line segment.
double
The outline is made up of two solid lines.
groove
The outline looks as though it were carved into the background.
ridge
The opposite of groove: the outline looks as though it were rising out of the background.
inset
The outline makes the box look as though it were embedded in the background.
outset
The opposite of inset: the outline makes the box look as though it were rising out of the background.
inherit
Use the same computed value as the parent element for this property.

Default value

none

Applies to

All elements

Inherited

No

See also