← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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