← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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