← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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