← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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