← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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