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