← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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