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