← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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