← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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