← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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