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