← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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