← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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