← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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