← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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