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