← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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