← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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