← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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