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