Colors in CSS

CSS allows you to set colors for text, backgrounds, borders, and other elements. Colors can be specified using color names, hexadecimal values, RGB, or RGBA.

Examples

This text is red.

This text has a blue background with white text.

This text has a transparent red background (50% opacity).

Try combining different color properties to create visually engaging designs!

Prev: <style> vs External Stylesheets Next: Font Stylings Back to Table of Contents