← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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