← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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