← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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