← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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