← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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