← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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