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