← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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