← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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