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