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