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