← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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