← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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