← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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