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