Named Colors
Named colors are the simplest way to apply colors, but they don't give us as much color selection as other methods. For comparison, CSS has 166 named colors, while there are over 16 million RGB, HEX, or HSL colors in CSS!
However, that doesn't mean named colors are useless. Their advantage lies in the simplicity of their usage. For example, if we wanted to color paragraphs white , we can use the following rule:
p {
color: white;
}
The color
property sets the foreground color. In the case of a paragraph, it colors the text.
Instructions
Add a rule to second-level headings (h2
) that changes their color to green.
Start programming for free
2/8