← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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