← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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