← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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