← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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