← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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