← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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