← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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