← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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