← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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