← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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