loading

Outline Shorthand

CSS Outline - Shorthand property

Setting each of the following distinct outline properties is made easier with the use of the outline property:

  • outline-width
  • outline-format (essential)
  • outline-color

One, two, or three values from the following list are designated as the outline property. It doesn’t matter what order the values are in.

A few outlines with the shorthand outline property specified are displayed in the example that follows:

A dashed outline.

A dotted red outline.

A 5px solid yellow outline.

A thick ridge pink outline.

Example

				
					p.ex1 {outline: dashed;}
p.ex2 {outline: dotted red;}
p.ex3 {outline: 5px solid yellow;}
p.ex4 {outline: thick ridge pink;}
				
			
Share this Doc

Outline Shorthand

Or copy link

Explore Topic