WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

CSS Outline


CSS Outline Properties

The outline is a line drawn around the element, located on the periphery of the edge of the border, and can play a role in highlighting the element.

The outline attribute specifies the style, color, and width of the element's outline.

The outline is a line drawn around the element, located on the periphery of the border of the border, and can play a role in highlighting the element.

The CSS outline property specifies the style, color, and width of the element's outline.


Outline Style

outline (outline) is a line drawn around the element, located on the periphery of the border edge, and can play a role in highlighting the element.

Outline shorthand attributes set all outline attributes in one declaration.

The attributes that can be set are (in order): outline-color, outline-style, outline-width

Try it yourself »

Outline Color

outline (outline) is a line drawn around the element, on the periphery of the edge of the border.

The

outline-color attribute specifies the outline color.

Note: Always declare the outline-style property before the outline-color property. An element cannot change its outline color until it has an outline.

Example

p
{
outline-style:dotted;
outline-color:#00ff00;
}
Try it yourself »

Outline Width

outline (outline) is a line drawn around the element, on the periphery of the edge of the border.

outline-width specifies the width of the outline.

Note: Always declare the outline-style property before the outline-width property. An element cannot change its outline width until it has an outline.

Example

p { outline-style:dotted; outline-width:5px; }
Try it yourself »

Outline - outline-style

outline (outline) is a line drawn around the element, on the periphery of the edge of the border.

The

outline-style attribute specifies the style of the outline.

Example

p
{
outline-style:dotted;
}

Result:

Try it yourself »