← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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