← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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