← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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