← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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