← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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