← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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