← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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