← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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