← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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