← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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