← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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