← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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