← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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