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