← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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