← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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