← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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