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