← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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