← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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