← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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