← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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