← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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