← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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