← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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