← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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