← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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