← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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