← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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