← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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