Colors & Keywords
Learn how to work with colors and use color keywords.
We'll cover the following
Working with colors
CSS helps make our web pages look more exciting. In HTML, we get a plain white background with black text and blue links. We can use CSS to add some color and make things more interesting!
The CSS color
property lets us control the color of our text:
Working with colors
The CSS color property lets us control the color of our text:
p {
color: lime;
}
It can accept any CSS color
value. These are categorized as named colors, hex colors, RGB and RGBA colors, and HSL and HSLA colors.
Let’s begin by looking at named colors.
Named colors
p {
color: red;
}
Named colors (or keyword colors) are CSS keywords that define colors, such red, blue, lime, aqua, light coral, and so on.
CSS originally started with 16 colors. Today, however, there are tons of options. You can find a list of supported colors. Named colors are very convenient. But there are some other options that feature more specific colors.
Example
Get hands-on with 1400+ tech skills courses.