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