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