← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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