← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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