← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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