← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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