← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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