The color and background-color properties
The color property sets an element's text colour using a name or hex value. background-color sets the colour behind the text. Choose pairs with enough contrast to read.
Understanding The color and background-color properties in ACARA Digital Technologies Years 9–10
What it does: The color property changes the text colour, so h1 { color: navy; } turns the heading text navy. A dark background paired with white text has high contrast, and each property controls its own part of the element. A hex colour must start with a # symbol. Without it the browser ignores the declaration. Each declaration ends with a semicolon, not a comma. The name navy is the same colour as the hex value #000080. You can use either a name or a hex value. background-color fills the area behind the content, and #ffeb3b is a hex code for a bright yellow.
Common mistakes: A CSS rule must open its declaration block with a curly brace {, not a round bracket. It should be p {. CSS uses the American spelling color. The property colour does not exist, so the white text is ignored. It should be color: white;.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 155–225) and word search (Modules 116–225).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
color: navy;Fill in the Blanks
Spot the Error
Student with a class code? Join your class →