← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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