← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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