← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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