Outline Properties

CSS outline properties control the outer border of an element, similar to borders but without affecting layout size. They are often used for accessibility and focus indicators.

PropertyPossible ValuesDescription
outlinewidth style colorShorthand for setting outline properties
outline-widththin, medium, thick, px, emSets the thickness of the outline
outline-stylesolid, dashed, dotted, double, groove, ridge, noneDefines the style of the outline
outline-colorcolor name, hex, rgb, transparentSpecifies the color of the outline
outline-offsetpx, emAdds space between the outline and the element's border

Explanation of Values

Value TypeDescriptionExample
thin, medium, thickPredefined widthsoutline-width: thick;
px, emCustom width valuesoutline-width: 5px;
solidContinuous lineoutline-style: solid;
dashedDashed outlineoutline-style: dashed;
dottedDotted outlineoutline-style: dotted;
doubleDouble-line outlineoutline-style: double;
outline-offsetMoves outline away from the borderoutline-offset: 4px;

Example 

button {
    outline: 2px dashed red;
    outline-offset: 5px;
}
Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2025 Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz