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