← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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