← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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