← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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