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