← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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