← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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