← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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