← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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