← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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