← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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