Text Colour

As much as black text on a white background, it’s great to be able to change things up as well, which we can do in CSS. There’s a few different properties that we can use to change colours, the first is color which is used for changing the colour of text.

p {
	color: mediumseagreen;

Note the US spelling of the CSS property, programming uses the US spelling of words, so colour is color and centre is center. It’s a bit confusing at first, but pretty soon it’ll be second nature to you, and you’ll be able to switch between the two depending on if you’re writing code or something else.

Try changing the colour of the h2 elements below. Or the colour of the p elements

See the Pen CSS Properties - Text Colour on CodePen.