← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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