← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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