← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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