← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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