← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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