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