← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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