← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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