← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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