← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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