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