← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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