← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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