← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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