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