← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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