← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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