← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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