← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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