← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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