← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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