← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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