← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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