outline

The outline property is a shorthand property for setting the color, style, and width of an element's outline.

CSS2

Syntax

outline: [ <'outline-color'> || <'outline-style'> || <'outline-width'> ] | inherit
Initial: value of the color property, none, medium
Applies To: all elements
Inherited: no
Percentages: NA
Media: visual, interactive

Values

outline: value
Value Initial Description
color
style none
width medium

DOM

[window.]document.getElementById("element-id").style.outline = "outline-color outline-style outline-width";

Example | color | color

Example | color | invert

Example | style | dashed

Example | style | dotted

Example | style | double

Example | style | groove

Example | style | hidden

Example | style | inset

Example | style | none

Example | style | outset

Example | style | ridge

Example | style | solid

Example | width | length

Example | width | medium

Example | width | thick

Example | width | thin

Example | DOM

External

W3C Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification

W3C CSS Basic User Interface Module Level 3 (CSS3 UI)