← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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