← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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