← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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