← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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