← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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