← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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