← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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