← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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