← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

HTML and CSS lesson 14: Colour and text properties · Set 626 · 40 questions
TalentJR

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

Answer key

  1. text-align
  2. colours behind the text
  3. on the right
  4. 12
  5. blue
  6. green
  7. 28
  8. on the left
  9. red
  10. font-size
  11. white
  12. sets the letter colour
  13. orange
  14. font-weight
  15. 12
  16. in the middle
  17. picks the font style
  18. yellow
  19. on the right
  20. orange
  21. 24
  22. centres a heading
  23. white
  24. red
  25. red
  26. 32
  27. 12
  28. font-family
  29. makes the text bold
  30. background-color
  31. 12
  32. color
  33. white
  34. 28
  35. 32
  36. 20
  37. 20
  38. makes letters bigger
  39. 20
  40. in the middle

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids