← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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