← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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