← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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