← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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