← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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