CSS Worksheet: Colour and Text Properties
Code tip (Letters, behind, size, place): color = colour of the letters; background-color = colour behind them. font-size = how big (e.g. 20px); font-weight: bold = thick letters; font-family = the font. text-align: left / center / right places the text on its line.
NameDateTime takenScore ___ / 40
- 1.🖌️ Which CSS property makes the text bold? (a) font-weight (b) font-size (c) color (d) background-color
-
2.🖌️ What colour are the letters?
p {
background-color: yellow;
font-size: 16px;
text-align: right;
color: purple;
} (a) purple (b) yellow (c) red - 3.🖌️ Which CSS property sets the letter colour? (a) color (b) font-family (c) background-color (d) font-size
-
4.🖌️ What colour are the letters?
h2 {
background-color: orange;
font-size: 36px;
text-align: left;
color: white;
} (a) red (b) orange (c) white - 5.What does font-family do? (a) sets the letter colour (b) makes the text bold (c) picks the font style (d) centres a heading
- 6.🖌️ Which CSS property centres a heading? (a) text-align (b) font-size (c) background-color (d) font-family
-
7.🖌️ Where does the text sit on its line?
li {
background-color: black;
text-align: right;
font-size: 16px;
color: red;
} (a) in the middle (b) on the left (c) on the right -
8.🖌️ Where does the text sit on its line?
li {
color: yellow;
font-size: 28px;
background-color: white;
text-align: right;
} (a) on the left (b) in the middle (c) on the right -
9.🖌️ How big is the text, in px?
h2 {
color: black;
font-size: 20px;
background-color: blue;
text-align: left;
} -
10.🖌️ How big is the text, in px?
h2 {
font-size: 36px;
background-color: white;
color: black;
text-align: center;
} -
11.🖌️ How big is the text, in px?
p {
font-size: 36px;
text-align: left;
color: red;
background-color: purple;
} - 12.🖌️ Which CSS property makes letters bigger? (a) text-align (b) background-color (c) font-weight (d) font-size
-
13.🖌️ What colour are the letters?
h2 {
background-color: orange;
text-align: left;
font-size: 28px;
color: blue;
} (a) blue (b) orange (c) green -
14.🖌️ How big is the text, in px?
h2 {
text-align: center;
font-size: 24px;
color: purple;
background-color: orange;
} -
15.🖌️ How big is the text, in px?
h1 {
background-color: green;
font-size: 12px;
color: black;
text-align: left;
} -
16.🖌️ How big is the text, in px?
p {
background-color: orange;
color: yellow;
font-size: 20px;
text-align: left;
} -
17.🖌️ What colour are the letters?
h2 {
text-align: center;
color: black;
background-color: white;
font-size: 20px;
} (a) yellow (b) black (c) white -
18.🖌️ How big is the text, in px?
h1 {
background-color: black;
font-size: 32px;
color: red;
text-align: left;
} -
19.🖌️ What colour are the letters?
p {
text-align: left;
background-color: red;
font-size: 12px;
color: yellow;
} (a) black (b) yellow (c) red - 20.What does background-color do? (a) picks the font style (b) sets the letter colour (c) colours behind the text (d) centres a heading
-
21.🖌️ Where does the text sit on its line?
h1 {
font-size: 32px;
background-color: orange;
color: white;
text-align: left;
} (a) in the middle (b) on the left (c) on the right -
22.🖌️ What colour are the letters?
h1 {
font-size: 12px;
text-align: left;
color: blue;
background-color: green;
} (a) yellow (b) green (c) blue -
23.🖌️ How big is the text, in px?
li {
font-size: 20px;
background-color: purple;
color: orange;
text-align: center;
} - 24.What does text-align do? (a) makes letters bigger (b) makes the text bold (c) centres a heading (d) sets the letter colour
-
25.🖌️ What colour is behind the letters?
p {
background-color: blue;
text-align: right;
color: red;
font-size: 28px;
} (a) red (b) green (c) blue -
26.🖌️ What colour are the letters?
h2 {
background-color: green;
font-size: 24px;
text-align: left;
color: yellow;
} (a) blue (b) yellow (c) green -
27.🖌️ How big is the text, in px?
h2 {
text-align: left;
background-color: black;
color: purple;
font-size: 24px;
} -
28.🖌️ Where does the text sit on its line?
h1 {
color: orange;
text-align: right;
background-color: blue;
font-size: 36px;
} (a) on the right (b) on the left (c) in the middle -
29.🖌️ What colour is behind the letters?
p {
font-size: 40px;
text-align: center;
background-color: green;
color: white;
} (a) green (b) orange (c) white - 30.🖌️ Which CSS property colours behind the text? (a) background-color (b) color (c) font-family (d) font-size
-
31.🖌️ What colour are the letters?
h2 {
background-color: red;
color: black;
text-align: left;
font-size: 16px;
} (a) red (b) black (c) orange -
32.🖌️ What colour are the letters?
li {
color: orange;
font-size: 16px;
background-color: purple;
text-align: right;
} (a) orange (b) blue (c) purple -
33.🖌️ What colour are the letters?
h1 {
text-align: right;
background-color: red;
font-size: 24px;
color: purple;
} (a) red (b) purple (c) orange -
34.🖌️ What colour are the letters?
p {
text-align: right;
color: orange;
font-size: 24px;
background-color: white;
} (a) orange (b) white (c) blue - 35.What does color do? (a) makes the text bold (b) sets the letter colour (c) centres a heading (d) colours behind the text
-
36.🖌️ How big is the text, in px?
h1 {
font-size: 28px;
text-align: right;
color: green;
background-color: purple;
} -
37.🖌️ How big is the text, in px?
li {
background-color: blue;
text-align: right;
font-size: 36px;
color: red;
} - 38.What does font-weight do? (a) colours behind the text (b) sets the letter colour (c) centres a heading (d) makes the text bold
-
39.🖌️ What colour are the letters?
h2 {
color: yellow;
text-align: right;
font-size: 16px;
background-color: red;
} (a) red (b) purple (c) yellow -
40.🖌️ What colour are the letters?
li {
font-size: 24px;
color: black;
background-color: white;
text-align: center;
} (a) black (b) red (c) white
Answer key
- font-weight
- purple
- color
- white
- picks the font style
- text-align
- on the right
- on the right
- 20
- 36
- 36
- font-size
- blue
- 24
- 12
- 20
- black
- 32
- yellow
- colours behind the text
- on the left
- blue
- 20
- centres a heading
- blue
- yellow
- 24
- on the right
- green
- background-color
- black
- orange
- purple
- orange
- sets the letter colour
- 28
- 36
- makes the text bold
- yellow
- black
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids