← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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