← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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