← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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