← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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