← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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