← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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