← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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