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