← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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