← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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