← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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