← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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