← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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