← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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