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