← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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