← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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