← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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