← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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