← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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