← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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