← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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