← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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