← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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