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