Setting Color Property

The color property typically defines the color of the text content of an element.

For instance, the color property specified in the body selector defines the default text color (foreground color in general) for the whole page.

body {
color: #000000;
}

Affect of Color Property on Borders and Oulines

The color property is not just for text content, but for anything in the foreground that takes a color value. For instance, if border-color or outline-color value hasn’t been defined explicitly for the element, the color value will be used instead.

p.one {
color: #0000ff;
border: 2px solid;
}
p.two {
color: #00ff00;
outline: 2px solid;
}