← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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