← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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