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