← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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