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