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