← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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