← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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