← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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