← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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