← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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