← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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