← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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