← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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