← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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