← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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