← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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