← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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