← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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