← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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