← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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