← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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