HTML and CSS · lesson 14 of 30 · free

Colour and text properties — HTML and CSS for kids

The most used CSS properties change text. The color property sets the colour of the letters, and background-color sets the colour behind them. font-size sets how big the letters are, often in pixels. text-align puts the text on the left, in the middle (center) or on the right. font-weight makes text bold and font-family picks the font.

▶ Watch how it works

Got it? Practise ↓

Code tip

Letters, behind, size, place — “color is the letters, background-color is behind, font-size is the size, text-align is the place”

  1. color = colour of the letters; background-color = colour behind them.
  2. font-size = how big (e.g. 20px); font-weight: bold = thick letters; font-family = the font.
  3. text-align: left / center / right places the text on its line.

Use it for: Making headings stand out, colouring a page and centring a title.

Worked example: 🖌️ What colour are the letters?
p {
  font-size: 32px;
  background-color: green;
  text-align: right;
  color: orange;
} → orange

  1. The letters are set by color, not background-color.
  2. color: orange.

Check: Green is behind the letters; the letters are orange ✓

▶ Watch it animated

✏️ Practice

Work it out in your head or on paper, type the answer and press Check. Stuck? Press “Show me how”.

Right: 0 · Tried: 0

🏁 Lesson 14 test

20 questions. Check each answer, then go to the next one. Get 16 or more right to pass.

🏅 Sign in with Google to earn the 🖌️ Font and Colour Fixer badge when you pass — and a certificate when you finish all 10 lessons of Part 2 · CSS. You can still take the test without signing in.

🖨️ CSS Worksheet: Colour and Text Properties

✨ Free AI tutor

Ask the AI tutor about this lesson

Why does it work? When should you use it? Ask in English, मराठी or हिंदी.

Sign in with Google to ask Free — 20 questions a day.

👩‍🏫 HTML and CSS classes near you — online or at home

Prefer a real teacher? TalentJR teachers take live online classes anywhere in India and visit homes in selected cities. Tell us what you need and our team will call you with timings and fees.

Live online classesSmall groups or 1:1 with a teacher, from home, any city.
Teacher at homeA TalentJR teacher visits your home (selected cities).
At a centreClasses at a TalentJR partner centre near you, where available.
Badges, certificates & gifts A badge for every lesson you pass, a certificate for every part you finish, plus TalentJR Points for daily practice. Computer worksheets Flowcharts, block coding, spreadsheets and safe internet.