← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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