← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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