← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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