← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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