← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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