← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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