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