← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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