← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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