← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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