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