CSS Outline
- An outline is a line drawn outside the element's border.
- The outline property is a line that is drawn around the elements and it is outside the border.
- In today's tutorial, we will different outline properties, outline style values, and an example of using CSS Outline property:
This will be our basic boilerplate code for outline property
index.html
Different Outline Properties
i)
This outline property is used to specify the style of the outline.
ii) outline color
This property is used to set the color of the outline.
iii) outline width
The outline-width property is used to set the width of the outline.
iv) outline offset
This property is used to set the space between an outline and the edge or border of an element.
v) outline
This is the shorthand property of the outline used to set the width, style, and color of the outline.
Outline Style Values
i) dotted
It define a dotted outline.
ii) dashed
It defines a dashed outline.
iii) solid
It define a solid outline.
iv) double
It defines a double outline.
v) groove
It defines a 3D grooved outline.
vi) ridge
It defines a 3D ridged outline.
vii) inset
Defines a 3D inset outline.
viii) outset
Defines a 3D outset outline.
CSS Outline Property Example
Output:
This is a paragraph