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