← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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