← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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