← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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