← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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