← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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