← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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