← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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