← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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