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