← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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