← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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