← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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