← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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