← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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