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