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