← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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