← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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