← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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