← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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