The CSS outline property is used to add an outline to an HTML element. An outline is a line drawn around an element outside the frame to visually separate it from the rest of the content. The outline is only visible when the element has focus and, unlike a frame, doesn’t take up space on the page.
element {
outline: width style color;
}
width: The width of the outline, specified in pixels, percentages, or other length units.
style: The style of the outline, such as dotted, solid, or double.
color: The color of the outline, specified using a color name, hex code, or RGB value.
CSS Outline Style
The outline-style property specifies the style of the outline, and can choose one of the following
dotted – Defines a dotted outline
dashed – Defines a dashed outline
solid – Defines a solid outline
double – Defines a double outline
groove – Defines a 3D grooved outline
ridge – Defines a 3D ridged outline
inset – Defines a 3D inset outline
outset – Defines a 3D outset outline
none – Defines no outline
hidden – Defines a hidden outline
Please see the below examples