← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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