← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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