← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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