← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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