← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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