← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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