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