CSS Outline Width
CSS Outline Width
The outline-width
property specifies the width of the outline,
and can have one of the following values:
- thin (typically 1px)
- medium (typically 3px)
- thick (typically 5px)
- A specific size (in px, pt, cm, em, etc)
The following example shows some outlines with different widths:
A thin outline.
A medium outline.
A thick outline.
A 4px thick outline.
Example
p.ex1
{
border: 1px solid black;
outline-style: solid;
outline-color: red;
outline-width: thin;
}
p.ex2
{
border: 1px solid black;
outline-style: solid;
outline-color: red;
outline-width: medium;
}
p.ex3
{
border: 1px solid black;
outline-style: solid;
outline-color: red;
outline-width: thick;
}
p.ex4
{
border: 1px solid black;
outline-style: solid;
outline-color: red;
outline-width: 4px;
}
Try it Yourself »
Exercise?What is this?
Test your skills by answering a few questions about the topics of this page
Drag and drop the correct values to create a red, solid outline with a thin width.
p {
border: 1px solid black;
outline-style: ;
outline-color: ;
outline-width: ;
}
thin
solid
red
medium