← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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