← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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