← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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