← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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