← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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