← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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