← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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