← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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