← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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