← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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