← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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