← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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