← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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