← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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