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