← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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