← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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