Extensible HyperText Markup Language

XHTML.com recommends: PSD to HTML Slicing Service

outline

Definition

The outline property is a shorthand method of setting outline-width, outline-style and outline-color property values. 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 outlines (seen in the screen shot 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.

Example

  1. input:focus, select:focus, textarea:focus {
  2. outline: 2px dotted blue
  3. }

This is equivalent to:

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

Characteristics

Possible values

Default value

See individual properties

Applies to

All elements

Inherited

No

See also