← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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