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