← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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