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