← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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