← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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