← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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