← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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