← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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