← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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