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