← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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