← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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