← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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