← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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