← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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