← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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