← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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