← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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