← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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