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