← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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