← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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