CSS Color Keywords - Detailed Overview

Introduction to Color Keywords

CSS provides a variety of color keywords that can be used to set colors in styles. These keywords are predefined colors that are widely recognized and supported across browsers.

Basic Color Keywords

Here are some common CSS color keywords:

.color-black { background-color: black; }
.color-white { background-color: white; color: black; }
.color-gray { background-color: gray; }
.color-red { background-color: red; }
.color-green { background-color: green; }
.color-blue { background-color: blue; }
.color-yellow { background-color: yellow; color: black; }
.color-cyan { background-color: cyan; }
.color-magenta { background-color: magenta; }
.color-olive { background-color: olive; }
.color-maroon { background-color: maroon; }
.color-navy { background-color: navy; }

Color Keyword Examples

Black
White
Gray
Red
Green
Blue
Yellow
Cyan
Magenta
Olive
Maroon
Navy