← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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