← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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