← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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