← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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