← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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