In this lesson, we’ll learn the fundamental CSS color properties and values that allow us to enhance the visuals of our web pages. Manipulating colors effectively is a great way to create engaging and accessible user experiences. We’ll explore text color, background color, border color, and the various ways to define colors in CSS, including named colors, hexadecimal, RGB(A), HSL(A), and CSS variables.

Changing foreground color

The color property in CSS sets the foreground color of an element’s text content. It’s one of the most commonly used properties for styling text.

Get hands-on with 1400+ tech skills courses.