← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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