← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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