← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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