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