← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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