← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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