← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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