Skip to content

Help us create more tutorials! Make a donation using the Donate button or become a member using the button below to hide this banner and track your progress.

Text color – CSS



To change the color of an element’s text using CSS, use the color property:

selector {
  color: red;


You can use RGB, hex, HSL, and keyword values for the color property.


First, recreate the CSS code from the Demo section in your CSS file. Then try changing the value for the property.


color property on MDN

Back to: CSS Course > CSS Properties