← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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