← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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