← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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