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