← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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