← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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