← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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