← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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