← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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