← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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