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