← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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