← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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