← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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