← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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