← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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