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