← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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