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