CSS Tutorial
Menu
CSS Advanced
Menu
CSS Responsive
Menu
CSS Grid
Menu
Outline color
The outline-color property set the color of the outline.
The color is used to set by:
- name – defines the color name, like “red”
- HEX – defines the hex value, like “#ff0000”
- RGB – defines the RGB value, like “rgb(255,0,0)”
- HSL – defines the HSL value, like “hsl(0, 100%, 50%)”
HTML
The outline-color Property
The outline-color property is used to set the color of the outline.
A solid outline.
A dotted outline.
An outset outline.
CSS
p.ex1 {
border: 2px solid black;
outline-style: solid;
outline-color: red;
}
p.ex2 {
border: 2px solid black;
outline-style: dotted;
outline-color: blue;
}
p.ex3 {
border: 2px solid black;
outline-style: outset;
outline-color: grey;
}
Output