← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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