← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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