← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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