← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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