← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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