← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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