← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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