← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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