← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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