← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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