← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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