← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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