← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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