← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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