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