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