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