← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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