← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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