← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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