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