← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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