← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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