← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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