← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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