← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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