CSS outline-style

The outline-style property in CSS allows you to set the style of an outline drawn around an element. The outline is similar to a border, but it is drawn outside the border edge of the element and does not take up space in the layout. You can set various styles for the outline such as dotted, dashed, solid, double, groove, ridge, inset, outset, and none.

Here is the syntax for setting the outline style:


selector {
  outline-style: value;
}

Here are some examples of how to use the outline-style property:

Result:
Dotted Outline
Result:
Dashed Outline
Result:
Solid Outline
Result:
Double Outline

Experiment with different outline-style values to see how they affect the appearance of the outline around the element.