← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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