← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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