← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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