← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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