Web - CSS Colors
Code Life
By Pierre Marsaa
Introduction to CSS Colors
Colors are a fundamental part of CSS styling. They allow you to control how your HTML elements look. There are two main properties for applying colors:
- color - Sets the color of the text content
- background-color - Sets the background color of an element
↗️
Loading editor...
↶
↷
In the example above:
- The heading text is blue with a yellow background
- The paragraph text is green with a light gray background
Verify