← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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