CSS · Colour and backgrounds

color

Sets the text colour. Check contrast against the background, not against white.

Syntax
color: #17130f

Example

Try it

More in this group

accent-color background-clip background-color background-image background-position background-repeat background-size currentColor

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course