← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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