← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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