← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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