← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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