← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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