← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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