← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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