← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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