← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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