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