← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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