← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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