← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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