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